close-on-exec
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23463 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -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));
|
||||
|
Reference in New Issue
Block a user