diff options
author | Kozlov Dmitry <xeb@mail.ru> | 2012-01-13 12:38:26 +0400 |
---|---|---|
committer | Kozlov Dmitry <xeb@mail.ru> | 2012-01-13 12:38:26 +0400 |
commit | bf1ccc7f6e7a9dc5a8ba3d8d02b25ad446458840 (patch) | |
tree | 4e53a7f2990e40436f6ae98434f72c3db14434c0 /crypto/crypto.c | |
parent | 03a466f1b0f7549c2ef89c1e544c2c86c3958ad4 (diff) | |
download | accel-ppp-bf1ccc7f6e7a9dc5a8ba3d8d02b25ad446458840.tar.gz accel-ppp-bf1ccc7f6e7a9dc5a8ba3d8d02b25ad446458840.zip |
set FD_CLOEXEC on opened file descriptors
Diffstat (limited to 'crypto/crypto.c')
-rw-r--r-- | crypto/crypto.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/crypto.c b/crypto/crypto.c index a7530356..634c0831 100644 --- a/crypto/crypto.c +++ b/crypto/crypto.c @@ -116,5 +116,6 @@ void DES_ecb_encrypt(const_DES_cblock *input, DES_cblock *output, DES_key_schedu static void __attribute__((constructor)) init(void) { urandom_fd = open("/dev/urandom", O_RDONLY); + fcntl(urandom_fd, F_SETFD, fcntl(urandom_fd, F_GETFD) | FD_CLOEXEC); } #endif |