summaryrefslogtreecommitdiffstats
path: root/lib/libc/db
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2009-03-28 07:26:00 +0000
committerdelphij <delphij@FreeBSD.org>2009-03-28 07:26:00 +0000
commit2ca1d8e1e96f9ca5abe40be147c7076163b69c68 (patch)
treedd0c2c5dd187da8071e7eda1888154e4d00fd897 /lib/libc/db
parentb4ced14429dedd5fd4aee43789bd5982fb9c025c (diff)
downloadFreeBSD-src-2ca1d8e1e96f9ca5abe40be147c7076163b69c68.zip
FreeBSD-src-2ca1d8e1e96f9ca5abe40be147c7076163b69c68.tar.gz
Allow O_SYNC and O_NOFOLLOW flags in dbopen().
Obtained from: OpenBSD
Diffstat (limited to 'lib/libc/db')
-rw-r--r--lib/libc/db/db/db.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/db/db/db.c b/lib/libc/db/db/db.c
index 7f18a8d..3cfd0a9 100644
--- a/lib/libc/db/db/db.c
+++ b/lib/libc/db/db/db.c
@@ -50,8 +50,8 @@ dbopen(const char *fname, int flags, int mode, DBTYPE type, const void *openinfo
#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_CREAT | O_EXCL | O_EXLOCK | O_NOFOLLOW | O_NONBLOCK | \
+ O_RDONLY | O_RDWR | O_SHLOCK | O_SYNC | O_TRUNC)
if ((flags & ~(USE_OPEN_FLAGS | DB_FLAGS)) == 0)
switch (type) {
OpenPOWER on IntegriCloud