Allow O_SYNC and O_NOFOLLOW flags in dbopen().
Obtained from: OpenBSD
This commit is contained in:
parent
6c90d46ee5
commit
73590c342a
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user