diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2012-06-22 15:07:43 +0930 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2012-06-22 07:35:17 +0200 |
commit | 9d97bf3f47a591a71e96cad8a87ef13a2b277c9c (patch) | |
tree | f78151ab3e9a9ea72f89f933652669035272ff88 /lib/dbwrap/dbwrap.h | |
parent | 1acf548eb75c9641e4e2c07167b42bc4380f9158 (diff) | |
download | samba-9d97bf3f47a591a71e96cad8a87ef13a2b277c9c.tar.gz samba-9d97bf3f47a591a71e96cad8a87ef13a2b277c9c.tar.bz2 samba-9d97bf3f47a591a71e96cad8a87ef13a2b277c9c.zip |
dbwrap: dbwrap_local_open()
This simply opens a tdb: it will eventually switch depending on the
extension.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'lib/dbwrap/dbwrap.h')
-rw-r--r-- | lib/dbwrap/dbwrap.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/dbwrap/dbwrap.h b/lib/dbwrap/dbwrap.h index ef4ffc94d7..6c789e91a4 100644 --- a/lib/dbwrap/dbwrap.h +++ b/lib/dbwrap/dbwrap.h @@ -133,4 +133,18 @@ NTSTATUS dbwrap_store_bystring_upper(struct db_context *db, const char *key, NTSTATUS dbwrap_fetch_bystring_upper(struct db_context *db, TALLOC_CTX *mem_ctx, const char *key, TDB_DATA *value); +/** + * This opens an ntdb or tdb file: you can hand it a .ntdb or .tdb extension + * and it will decide (based on parameter settings, or else what exists) which + * to use. + * + * For backwards compatibility, it takes tdb-style open flags, not ntdb! + */ +struct db_context *dbwrap_local_open(TALLOC_CTX *mem_ctx, + struct loadparm_context *lp_ctx, + const char *name, + int hash_size, int tdb_flags, + int open_flags, mode_t mode, + enum dbwrap_lock_order lock_order); + #endif /* __DBWRAP_H__ */ |