diff options
author | Volker Lendecke <vl@samba.org> | 2014-03-26 14:06:08 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2014-03-31 22:52:13 +0200 |
commit | e2e06b342a826bcbb6e6a116edf2ffc4fd43ad22 (patch) | |
tree | 2c561bec5685358ec8eb79f2808c419bf0b9c631 /lib | |
parent | 6008e8f9447603f3c93e308bc3c1fc9a961bbbfd (diff) | |
download | samba-e2e06b342a826bcbb6e6a116edf2ffc4fd43ad22.tar.gz |
param: Add lpcfg_tdb_flags()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/param/loadparm.c | 9 | ||||
-rw-r--r-- | lib/param/wscript_build | 2 |
2 files changed, 10 insertions, 1 deletions
diff --git a/lib/param/loadparm.c b/lib/param/loadparm.c index 9ad14d8ae4f..fd5e5e3dac2 100644 --- a/lib/param/loadparm.c +++ b/lib/param/loadparm.c @@ -66,6 +66,7 @@ #include "lib/param/s3_param.h" #include "lib/util/bitmap.h" #include "libcli/smb/smb_constants.h" +#include "tdb.h" #define standard_sub_basic talloc_strdup @@ -2796,3 +2797,11 @@ int lpcfg_tdb_hash_size(struct loadparm_context *lp_ctx, const char *name) return lpcfg_parm_int(lp_ctx, NULL, "tdb_hashsize", base, 0); } + +int lpcfg_tdb_flags(struct loadparm_context *lp_ctx, int tdb_flags) +{ + if (!lpcfg_use_mmap(lp_ctx)) { + tdb_flags |= TDB_NOMMAP; + } + return tdb_flags; +} diff --git a/lib/param/wscript_build b/lib/param/wscript_build index 8fe751c4644..3c72a73dffb 100644 --- a/lib/param/wscript_build +++ b/lib/param/wscript_build @@ -33,7 +33,7 @@ bld.SAMBA_LIBRARY('samba-hostconfig', source='loadparm.c generic.c util.c', pc_files='samba-hostconfig.pc', vnum='0.0.1', - deps='DYNCONFIG server-role', + deps='DYNCONFIG server-role tdb', public_deps='samba-util param_local.h', public_headers='param.h', autoproto='param_proto.h' |