]> andersk Git - openssh.git/blobdiff - hostfile.c
fix spacing of include
[openssh.git] / hostfile.c
index 2e1c8bcd0c4ccf4d28cd5b5c8ac5dc7f60be4bc5..5cb55dd3c7b61f861ee6e8c112aa1ca814b43656 100644 (file)
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: hostfile.c,v 1.33 2005/03/01 10:40:26 djm Exp $");
+RCSID("$OpenBSD: hostfile.c,v 1.37 2006/02/07 03:47:05 stevesk Exp $");
 
 #include <resolv.h>
+
 #include <openssl/hmac.h>
 #include <openssl/sha.h>
 
-#include "packet.h"
 #include "match.h"
 #include "key.h"
 #include "hostfile.h"
@@ -88,11 +88,11 @@ extract_salt(const char *s, u_int l, char *salt, size_t salt_len)
                return (-1);
        }
        if (ret != SHA_DIGEST_LENGTH) {
-               debug2("extract_salt: expected salt len %u, got %u",
-                   salt_len, ret);
+               debug2("extract_salt: expected salt len %d, got %d",
+                   SHA_DIGEST_LENGTH, ret);
                return (-1);
        }
-       
+
        return (0);
 }
 
@@ -123,7 +123,7 @@ host_hash(const char *host, const char *name_from_hostfile, u_int src_len)
        HMAC_Final(&mac_ctx, result, NULL);
        HMAC_cleanup(&mac_ctx);
 
-       if (__b64_ntop(salt, len, uu_salt, sizeof(uu_salt)) == -1 || 
+       if (__b64_ntop(salt, len, uu_salt, sizeof(uu_salt)) == -1 ||
            __b64_ntop(result, len, uu_result, sizeof(uu_result)) == -1)
                fatal("host_hash: __b64_ntop failed");
 
@@ -310,12 +310,12 @@ lookup_key_in_hostfile_by_type(const char *filename, const char *host,
  */
 
 int
-add_host_to_hostfile(const char *filename, const char *host, const Key *key, 
+add_host_to_hostfile(const char *filename, const char *host, const Key *key,
     int store_hash)
 {
        FILE *f;
        int success = 0;
-       char *hashed_host;
+       char *hashed_host = NULL;
 
        if (key == NULL)
                return 1;       /* XXX ? */
This page took 0.036795 seconds and 4 git commands to generate.