]> andersk Git - openssh.git/blobdiff - authfile.c
[configure.ac] Make sure -lcrypto is before -lsocket for sco3. ok mouring@
[openssh.git] / authfile.c
index d563abb71a71ced188f2cf63e90af88f46109ff7..83ddd635f380ff4320a7691fc530da6813722f47 100644 (file)
@@ -36,7 +36,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: authfile.c,v 1.53 2003/05/11 16:56:48 markus Exp $");
+RCSID("$OpenBSD: authfile.c,v 1.55 2003/09/18 07:56:05 markus Exp $");
 
 #include <openssl/err.h>
 #include <openssl/evp.h>
@@ -143,6 +143,7 @@ key_save_private_rsa1(Key *key, const char *filename, const char *passphrase,
        fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0600);
        if (fd < 0) {
                error("open %s failed: %s.", filename, strerror(errno));
+               buffer_free(&encrypted);
                return 0;
        }
        if (write(fd, buffer_ptr(&encrypted), buffer_len(&encrypted)) !=
@@ -514,7 +515,7 @@ key_perm_ok(int fd, const char *filename)
                error("@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @");
                error("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@");
                error("Permissions 0%3.3o for '%s' are too open.",
-                   st.st_mode & 0777, filename);
+                   (u_int)st.st_mode & 0777, filename);
                error("It is recommended that your private key files are NOT accessible by others.");
                error("This private key will be ignored.");
                return 0;
This page took 0.039799 seconds and 4 git commands to generate.