Module Name:    src
Committed By:   martin
Date:           Thu Feb 20 14:48:19 UTC 2020

Modified Files:
        src/crypto/external/bsd/openssl/dist/crypto/rand [netbsd-9]:
            rand_unix.c

Log Message:
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


To generate a diff of this commit:
cvs rdiff -u -r1.12.2.1 -r1.12.2.2 \
    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.12.2.1 src/crypto/external/bsd/openssl/dist/crypto/rand/rand_unix.c:1.12.2.2
--- src/crypto/external/bsd/openssl/dist/crypto/rand/rand_unix.c:1.12.2.1	Mon Jan 27 07:21:42 2020
+++ src/crypto/external/bsd/openssl/dist/crypto/rand/rand_unix.c	Thu Feb 20 14:48:19 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 */

Reply via email to