summaryrefslogtreecommitdiffstats
path: root/libutil/pw_util.c
diff options
context:
space:
mode:
Diffstat (limited to 'libutil/pw_util.c')
-rw-r--r--libutil/pw_util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libutil/pw_util.c b/libutil/pw_util.c
index 24c0263..befd1fb 100644
--- a/libutil/pw_util.c
+++ b/libutil/pw_util.c
@@ -179,7 +179,7 @@ pw_lock(void)
for (;;) {
struct stat st;
- lockfd = flopen(masterpasswd, O_RDONLY|O_NONBLOCK, 0);
+ lockfd = flopen(masterpasswd, O_RDONLY|O_NONBLOCK|O_CLOEXEC, 0);
if (lockfd == -1) {
if (errno == EWOULDBLOCK) {
errx(1, "the password db file is busy");