summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-10-12 22:36:40 +1100
committerAndrew Bartlett <abartlet@samba.org>2011-10-13 14:06:07 +0200
commit4a89361af465227c96b07d009e67689c44b16e4e (patch)
tree4fd939d5bdd259dfbc8d018e82c47fc082ccad8a
parentebf3ecd986bbb5a84418b8519537054ac4fa0dc1 (diff)
downloadsamba-4a89361af465227c96b07d009e67689c44b16e4e.tar.gz
samba-4a89361af465227c96b07d009e67689c44b16e4e.tar.bz2
samba-4a89361af465227c96b07d009e67689c44b16e4e.zip
lib/param Add 'use mmap' parameter to control tdb use of mmap
-rw-r--r--lib/param/loadparm.c12
-rw-r--r--source3/param/loadparm_ctx.c3
2 files changed, 15 insertions, 0 deletions
diff --git a/lib/param/loadparm.c b/lib/param/loadparm.c
index 880b5217f4..58be25c85b 100644
--- a/lib/param/loadparm.c
+++ b/lib/param/loadparm.c
@@ -866,6 +866,15 @@ static struct parm_struct parm_table[] = {
.enum_list = NULL
},
{
+ .label = "use mmap",
+ .type = P_BOOL,
+ .p_class = P_GLOBAL,
+ .offset = GLOBAL_VAR(bUseMmap),
+ .special = NULL,
+ .enum_list = NULL,
+ .flags = FLAG_ADVANCED,
+ },
+ {
.label = "case insensitive filesystem",
.type = P_BOOL,
.p_class = P_LOCAL,
@@ -1549,6 +1558,7 @@ FN_GLOBAL_BOOL(client_use_spnego_principal, client_use_spnego_principal)
FN_GLOBAL_BOOL(host_msdfs, bHostMSDfs)
FN_GLOBAL_BOOL(unix_extensions, bUnixExtensions)
FN_GLOBAL_BOOL(use_spnego, bUseSpnego)
+FN_GLOBAL_BOOL(use_mmap, bUseMmap)
FN_GLOBAL_BOOL(rpc_big_endian, bRpcBigEndian)
FN_GLOBAL_INTEGER(max_wins_ttl, max_wins_ttl)
FN_GLOBAL_INTEGER(min_wins_ttl, min_wins_ttl)
@@ -3384,6 +3394,8 @@ struct loadparm_context *loadparm_init(TALLOC_CTX *mem_ctx)
lpcfg_do_global_parameter(lp_ctx, "use spnego", "True");
+ lpcfg_do_global_parameter(lp_ctx, "use mmap", "True");
+
lpcfg_do_global_parameter(lp_ctx, "smb ports", "445 139");
lpcfg_do_global_parameter(lp_ctx, "nbt port", "137");
lpcfg_do_global_parameter(lp_ctx, "dgram port", "138");
diff --git a/source3/param/loadparm_ctx.c b/source3/param/loadparm_ctx.c
index 8a886551c6..61fe97462d 100644
--- a/source3/param/loadparm_ctx.c
+++ b/source3/param/loadparm_ctx.c
@@ -105,6 +105,9 @@ static const struct loadparm_s3_context s3_fns =
.passdb_backend = lp_passdb_backend,
.host_msdfs = lp_host_msdfs,
+ .unix_extensions = lp_unix_extensions,
+ .use_spnego = lp_use_spnego,
+ .use_mmap = lp_use_mmap,
};
const struct loadparm_s3_context *loadparm_s3_context(void)