Module Name: src
Committed By: riastradh
Date: Sat Feb 15 23:19:37 UTC 2020
Modified Files:
src/crypto/external/bsd/openssl/dist/crypto/rand: rand_unix.c
Log Message:
Open /dev/urandom with O_CLOEXEC.
Let's avoid bleeding file descriptors into our clients' children,
shall we?
XXX pullup
To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 \
src/crypto/external/bsd/openssl/dist/crypto/rand/rand_unix.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/crypto/external/bsd/openssl/dist/crypto/rand/rand_unix.c
diff -u src/crypto/external/bsd/openssl/dist/crypto/rand/rand_unix.c:1.13 src/crypto/external/bsd/openssl/dist/crypto/rand/rand_unix.c:1.14
--- src/crypto/external/bsd/openssl/dist/crypto/rand/rand_unix.c:1.13 Thu Jan 23 02:54:55 2020
+++ src/crypto/external/bsd/openssl/dist/crypto/rand/rand_unix.c Sat Feb 15 23:19:37 2020
@@ -479,7 +479,7 @@ static int get_random_device(size_t n)
return rd->fd;
/* open the random device ... */
- if ((rd->fd = open(random_device_paths[n], O_RDONLY)) == -1)
+ if ((rd->fd = open(random_device_paths[n], O_RDONLY|O_CLOEXEC)) == -1)
return rd->fd;
/* ... and cache its relevant stat(2) data */