Module Name: src
Committed By: christos
Date: Mon Dec 22 17:01:42 UTC 2014
Modified Files:
src/lib/libc/db/db: db.c
Log Message:
whitelist O_CLOEXEC flag, should fix lastlogin issue.
To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/lib/libc/db/db/db.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libc/db/db/db.c
diff -u src/lib/libc/db/db/db.c:1.16 src/lib/libc/db/db/db.c:1.17
--- src/lib/libc/db/db/db.c:1.16 Thu Sep 11 08:58:00 2008
+++ src/lib/libc/db/db/db.c Mon Dec 22 12:01:42 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: db.c,v 1.16 2008/09/11 12:58:00 joerg Exp $ */
+/* $NetBSD: db.c,v 1.17 2014/12/22 17:01:42 christos Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -34,7 +34,7 @@
#endif
#include <sys/cdefs.h>
-__RCSID("$NetBSD: db.c,v 1.16 2008/09/11 12:58:00 joerg Exp $");
+__RCSID("$NetBSD: db.c,v 1.17 2014/12/22 17:01:42 christos Exp $");
#include "namespace.h"
#include <sys/types.h>
@@ -59,7 +59,7 @@ dbopen(const char *fname, int flags, mod
#define DB_FLAGS (DB_LOCK | DB_SHMEM | DB_TXN)
#define USE_OPEN_FLAGS \
(O_CREAT | O_EXCL | O_EXLOCK | O_NONBLOCK | O_RDONLY | \
- O_RDWR | O_SHLOCK | O_TRUNC)
+ O_RDWR | O_SHLOCK | O_TRUNC | O_CLOEXEC)
if ((flags & ~(USE_OPEN_FLAGS | DB_FLAGS)) == 0)
switch (type) {