From 5bf46d38c58a129726cbd5d53e8cfa4d30d674a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Sun, 27 Jul 2008 12:15:06 +0000 Subject: [PATCH] close-on-exec git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23463 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/hcrypto/rand-fortuna.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/hcrypto/rand-fortuna.c b/lib/hcrypto/rand-fortuna.c index 306cd1795..f75ba575c 100644 --- a/lib/hcrypto/rand-fortuna.c +++ b/lib/hcrypto/rand-fortuna.c @@ -505,6 +505,7 @@ fortuna_reseed(void) fd = open("/etc/shadow", O_RDONLY, 0); if (fd >= 0) { ssize_t n; + rk_cloexec(fd); /* add_entropy will hash the buf */ while ((n = read(fd, (char *)u.shad, sizeof(u.shad))) > 0) add_entropy(&main_state, u.shad, sizeof(u.shad));