]> andersk Git - openssh.git/blobdiff - hostfile.c
- (tim) [buildpkg.sh.in] Make the names consistent.
[openssh.git] / hostfile.c
index 2e1c8bcd0c4ccf4d28cd5b5c8ac5dc7f60be4bc5..3ed6462478734b4d9c36e929a3d953c37ef2d9c1 100644 (file)
@@ -36,7 +36,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: hostfile.c,v 1.33 2005/03/01 10:40:26 djm Exp $");
+RCSID("$OpenBSD: hostfile.c,v 1.36 2005/11/22 03:36:03 dtucker Exp $");
 
 #include <resolv.h>
 #include <openssl/hmac.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.240682 seconds and 4 git commands to generate.