(DB_open): correct the check for O_RDONLY
From: Chaskiel M Grundman <cg2v@andrew.cmu.edu> git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14578 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1997 - 2001 Kungliga Tekniska H<>gskolan
|
* Copyright (c) 1997 - 2005 Kungliga Tekniska H<>gskolan
|
||||||
* (Royal Institute of Technology, Stockholm, Sweden).
|
* (Royal Institute of Technology, Stockholm, Sweden).
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
@@ -254,7 +254,7 @@ DB_open(krb5_context context, HDB *db, int flags, mode_t mode)
|
|||||||
if (flags & O_EXCL)
|
if (flags & O_EXCL)
|
||||||
myflags |= DB_EXCL;
|
myflags |= DB_EXCL;
|
||||||
|
|
||||||
if (flags & O_RDONLY)
|
if((flags & O_ACCMODE) == O_RDONLY)
|
||||||
myflags |= DB_RDONLY;
|
myflags |= DB_RDONLY;
|
||||||
|
|
||||||
if (flags & O_TRUNC)
|
if (flags & O_TRUNC)
|
||||||
|
Reference in New Issue
Block a user