diff options
author | Michael Adam <obnox@samba.org> | 2014-01-28 12:37:36 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2014-02-07 16:06:07 +0100 |
commit | e4fbaadb5cadaa584f455d624eafe706703cda1a (patch) | |
tree | 517fd75c5225ce31ab2a9f90e16ebdd1c609c0d7 /lib/dbwrap | |
parent | bbf0903d6bf60afc38b75332e36d81868c05d22c (diff) | |
download | samba-e4fbaadb5cadaa584f455d624eafe706703cda1a.tar.gz |
dbwrap: add a dbwrap_flags argument to db_open_ntdb()
for consistency and to perpare for possible future
flags that the ntdb backend might be aware of.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'lib/dbwrap')
-rw-r--r-- | lib/dbwrap/dbwrap_local_open.c | 5 | ||||
-rw-r--r-- | lib/dbwrap/dbwrap_ntdb.c | 3 | ||||
-rw-r--r-- | lib/dbwrap/dbwrap_ntdb.h | 3 |
3 files changed, 7 insertions, 4 deletions
diff --git a/lib/dbwrap/dbwrap_local_open.c b/lib/dbwrap/dbwrap_local_open.c index 650bcb35df2..e54ed979f35 100644 --- a/lib/dbwrap/dbwrap_local_open.c +++ b/lib/dbwrap/dbwrap_local_open.c @@ -111,7 +111,7 @@ static bool tdb_to_ntdb(TALLOC_CTX *ctx, struct loadparm_context *lp_ctx, } ntdb = db_open_ntdb(ctx, lp_ctx, ntdbname, dbwrap_hash_size(tdb), TDB_DEFAULT, O_RDWR|O_CREAT|O_EXCL, - st.st_mode & 0777, 0); + st.st_mode & 0777, 0, DBWRAP_FLAG_NONE); if (!ntdb) { DEBUG(0, ("tdb_to_ntdb: could not create %s: %s\n", ntdbname, strerror(errno))); @@ -204,7 +204,8 @@ struct db_context *dbwrap_local_open(TALLOC_CTX *mem_ctx, } } db = db_open_ntdb(mem_ctx, lp_ctx, ntdbname, hash_size, - ntdb_flags, open_flags, mode, lock_order); + ntdb_flags, open_flags, mode, lock_order, + dbwrap_flags); } else { if (!streq(ntdbname, tdbname) && file_exist(ntdbname)) { DEBUG(0, ("Refusing to open '%s' when '%s' exists\n", diff --git a/lib/dbwrap/dbwrap_ntdb.c b/lib/dbwrap/dbwrap_ntdb.c index 48fe39e0586..5be5414eb9c 100644 --- a/lib/dbwrap/dbwrap_ntdb.c +++ b/lib/dbwrap/dbwrap_ntdb.c @@ -502,7 +502,8 @@ struct db_context *db_open_ntdb(TALLOC_CTX *mem_ctx, const char *ntdbname, int hash_size, int ntdb_flags, int open_flags, mode_t mode, - enum dbwrap_lock_order lock_order) + enum dbwrap_lock_order lock_order, + uint64_t dbwrap_flags) { struct db_context *result = NULL; struct db_ntdb_ctx *db_ntdb; diff --git a/lib/dbwrap/dbwrap_ntdb.h b/lib/dbwrap/dbwrap_ntdb.h index b00a5670a2a..a1da1bc0e4c 100644 --- a/lib/dbwrap/dbwrap_ntdb.h +++ b/lib/dbwrap/dbwrap_ntdb.h @@ -30,6 +30,7 @@ struct db_context *db_open_ntdb(TALLOC_CTX *mem_ctx, const char *name, int hash_size, int ntdb_flags, int open_flags, mode_t mode, - enum dbwrap_lock_order lock_order); + enum dbwrap_lock_order lock_order, + uint64_t dbwrap_flags); #endif /* __DBWRAP_NTDB_H__ */ |