From 9b7124911de719fb0eec5e1c7f4c125b60507b58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Sun, 27 Jul 2008 12:14:42 +0000 Subject: [PATCH] close-on-exec git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23462 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/hcrypto/rand-unix.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/hcrypto/rand-unix.c b/lib/hcrypto/rand-unix.c index a5908a0e1..eaa81b0f1 100644 --- a/lib/hcrypto/rand-unix.c +++ b/lib/hcrypto/rand-unix.c @@ -63,8 +63,10 @@ get_device_fd(int flags) for(p = rnd_devices; *p; p++) { int fd = open(*p, flags | O_NDELAY); - if(fd >= 0) + if(fd >= 0) { + rk_cloexec(fd); return fd; + } } return -1; }