]> arthur.barton.de Git - netatalk.git/blobdiff - libevent/arc4random.c
Fix typo
[netatalk.git] / libevent / arc4random.c
index ee2b73a27d8e3bbf073d024e8a04522a6dc9c127..cabc46f4b80a299858cb3e0accb22fd1905a6434 100644 (file)
@@ -260,7 +260,7 @@ arc4_seed_proc_sys_kernel_random_uuid(void)
        unsigned char entropy[64];
        int bytes, n, i, nybbles;
        for (bytes = 0; bytes<ADD_ENTROPY; ) {
-               fd = open("/proc/sys/kernel/random/uuid", O_RDONLY, 0);
+               fd = evutil_open_closeonexec("/proc/sys/kernel/random/uuid", O_RDONLY, 0);
                if (fd < 0)
                        return -1;
                n = read(fd, buf, sizeof(buf));
@@ -304,7 +304,7 @@ arc4_seed_urandom(void)
        size_t n;
 
        for (i = 0; filenames[i]; ++i) {
-               fd = open(filenames[i], O_RDONLY, 0);
+               fd = evutil_open_closeonexec(filenames[i], O_RDONLY, 0);
                if (fd<0)
                        continue;
                n = read_all(fd, buf, sizeof(buf));