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 <[email protected]>.
---
 crypto/rand/randfile.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/crypto/rand/randfile.c b/crypto/rand/randfile.c
index bd42f21..7b4c7dc 100644
--- a/crypto/rand/randfile.c
+++ b/crypto/rand/randfile.c
@@ -80,6 +80,7 @@
 #endif
 #ifndef OPENSSL_NO_POSIX_IO
 # include <sys/stat.h>
+# include <fcntl.h>
 #endif
 
 #ifdef _WIN32
-- 
2.0.0.rc2

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [email protected]
Automated List Manager                           [email protected]

Reply via email to