close-on-exec

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23463 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2008-07-27 12:15:06 +00:00
parent 9b7124911d
commit 5bf46d38c5

View File

@@ -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));