close-on-exec

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23454 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2008-07-27 12:11:44 +00:00
parent a49e280f58
commit b227a5249d

View File

@@ -3455,6 +3455,7 @@ seed_something(void)
fd = open(seedfile, O_RDONLY);
if (fd >= 0) {
ssize_t ret;
rk_cloexec(fd);
ret = read(fd, buf, sizeof(buf));
if (ret > 0)
RAND_add(buf, ret, 0.0);