Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-9]: src/crypto/external/bsd/openssl/dist/crypto/rand Pull up foll...



details:   https://anonhg.NetBSD.org/src/rev/93f2c69a593d
branches:  netbsd-9
changeset: 745001:93f2c69a593d
user:      martin <martin%NetBSD.org@localhost>
date:      Thu Feb 20 14:48:19 2020 +0000

description:
Pull up following revision(s) (requested by riastradh in ticket #714):

        crypto/external/bsd/openssl/dist/crypto/rand/rand_unix.c: revision 1.14

Open /dev/urandom with O_CLOEXEC.

Let's avoid bleeding file descriptors into our clients' children,
shall we?

XXX pullup

diffstat:

 crypto/external/bsd/openssl/dist/crypto/rand/rand_unix.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 564dd6ee94e9 -r 93f2c69a593d crypto/external/bsd/openssl/dist/crypto/rand/rand_unix.c
--- a/crypto/external/bsd/openssl/dist/crypto/rand/rand_unix.c  Thu Feb 20 14:42:30 2020 +0000
+++ b/crypto/external/bsd/openssl/dist/crypto/rand/rand_unix.c  Thu Feb 20 14:48:19 2020 +0000
@@ -479,7 +479,7 @@
         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 */



Home | Main Index | Thread Index | Old Index