Create ~/.rnd with mode 0600 instead of 0666
authorJakub Wilk <jwilk@debian.org>
Sat, 7 Jun 2014 12:37:17 +0000 (14:37 +0200)
committerMatt Caswell <matt@openssl.org>
Sun, 8 Jun 2014 20:29:23 +0000 (21:29 +0100)
Because of a missing include <fcntl.h> we don't have O_CREATE and don't create
the file with open() using mode 0600 but fall back to using fopen() with the
default umask followed by a chmod().

Problem found by Jakub Wilk <jwilk@debian.org>.

crypto/rand/randfile.c

index 030e07f41826f67a5c691520138b20c302166c9b..d30f6f1e7a0d01f5fe8f388bf3c598b340e00d4d 100644 (file)
@@ -77,6 +77,7 @@
 #endif
 #ifndef OPENSSL_NO_POSIX_IO
 # include <sys/stat.h>
+# include <fcntl.h>
 #endif
 
 #ifdef _WIN32