Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/crypto/external/bsd/openssl/dist/crypto/rand Open /dev/urand...
details: https://anonhg.NetBSD.org/src/rev/c9a9488bd38c
branches: trunk
changeset: 744891:c9a9488bd38c
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sat Feb 15 23:19:37 2020 +0000
description:
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 9b27739d67f5 -r c9a9488bd38c crypto/external/bsd/openssl/dist/crypto/rand/rand_unix.c
--- a/crypto/external/bsd/openssl/dist/crypto/rand/rand_unix.c Sat Feb 15 22:55:22 2020 +0000
+++ b/crypto/external/bsd/openssl/dist/crypto/rand/rand_unix.c Sat Feb 15 23:19:37 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