diff options
author | Okan Demirmen <okan@cvs.openbsd.org> | 2013-04-29 00:28:24 +0000 |
---|---|---|
committer | Okan Demirmen <okan@cvs.openbsd.org> | 2013-04-29 00:28:24 +0000 |
commit | 893b957ab23fe3eb2386c9acedd396606f76b5cb (patch) | |
tree | ef352fdb5afd940f9c19549bb1e8a4986357e87b /lib/libutil/passwd.c | |
parent | 8656f10462f9b7ede2d214dc09969c2fa153b626 (diff) |
use FD_CLOEXEC instead of 1; from David Hill
ok otto
Diffstat (limited to 'lib/libutil/passwd.c')
-rw-r--r-- | lib/libutil/passwd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libutil/passwd.c b/lib/libutil/passwd.c index cb2cd2ba269..11ee752e8a4 100644 --- a/lib/libutil/passwd.c +++ b/lib/libutil/passwd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: passwd.c,v 1.49 2006/12/20 23:07:36 ray Exp $ */ +/* $OpenBSD: passwd.c,v 1.50 2013/04/29 00:28:23 okan Exp $ */ /* * Copyright (c) 1987, 1993, 1994, 1995 @@ -107,7 +107,7 @@ pw_lock(int retries) fd = open(pw_lck, O_WRONLY|O_CREAT|O_EXCL, 0600); } save_errno = errno; - if (fd != -1 && fcntl(fd, F_SETFD, 1) == -1) { + if (fd != -1 && fcntl(fd, F_SETFD, FD_CLOEXEC) == -1) { close(fd); fd = -1; } |