diff options
Diffstat (limited to 'libuuid/src/gen_uuid.c')
-rw-r--r-- | libuuid/src/gen_uuid.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libuuid/src/gen_uuid.c b/libuuid/src/gen_uuid.c index 02e7f497e..387518a0c 100644 --- a/libuuid/src/gen_uuid.c +++ b/libuuid/src/gen_uuid.c @@ -235,10 +235,10 @@ static int get_clock(uint32_t *clock_high, uint32_t *clock_low, if (state_fd == -2) { save_umask = umask(0); - state_fd = open(LIBUUID_CLOCK_FILE, O_RDWR|O_CREAT, 0660); + state_fd = open(LIBUUID_CLOCK_FILE, O_RDWR|O_CREAT|O_CLOEXEC, 0660); (void) umask(save_umask); if (state_fd != -1) { - state_f = fdopen(state_fd, "r+"); + state_f = fdopen(state_fd, "r+" UL_CLOEXECSTR); if (!state_f) { close(state_fd); state_fd = -1; |