From 3c9c3029f2bcf10ef614dd9f923d02232db3ac8d Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 20 Feb 2013 14:59:42 +1030 Subject: param: 'use ntdb' flag (off by default). For simplicity, we use this in the caller to choose between filenames. Signed-off-by: Rusty Russell Reviewed-by: Andrew Bartlett --- docs-xml/smbdotconf/tuning/usentdb.xml | 23 +++++++++++++++++++++++ lib/param/param_functions.c | 1 + lib/param/param_table.c | 9 +++++++++ source3/include/proto.h | 1 + source3/param/loadparm_ctx.c | 1 + 5 files changed, 35 insertions(+) create mode 100644 docs-xml/smbdotconf/tuning/usentdb.xml diff --git a/docs-xml/smbdotconf/tuning/usentdb.xml b/docs-xml/smbdotconf/tuning/usentdb.xml new file mode 100644 index 0000000000..9a0d2cde79 --- /dev/null +++ b/docs-xml/smbdotconf/tuning/usentdb.xml @@ -0,0 +1,23 @@ + + + Beginning in Samba 4.1, a growing number of databases can + use the NTDB format rather than TDB. + + If you enable this option these databases will defaul to a + .ntdb extension rather than + .tdb: If the .tdb file + exists, it will automatically be converted to NTDB and renamed to + .tdb.bak. + + Filenames explicitly specified in + smb.conf will be respected (ie. the format + will depend on the .ntdb or + .tdb extension). + + + +no + diff --git a/lib/param/param_functions.c b/lib/param/param_functions.c index 852f525c44..4cf3ad7698 100644 --- a/lib/param/param_functions.c +++ b/lib/param/param_functions.c @@ -215,6 +215,7 @@ FN_GLOBAL_BOOL(unicode, bUnicode) FN_GLOBAL_BOOL(unix_extensions, bUnixExtensions) FN_GLOBAL_BOOL(unix_password_sync, bUnixPasswdSync) FN_GLOBAL_BOOL(use_mmap, bUseMmap) +FN_GLOBAL_BOOL(use_ntdb, bUseNtdb) FN_GLOBAL_BOOL(usershare_allow_guests, bUsershareAllowGuests) FN_GLOBAL_BOOL(usershare_owner_only, bUsershareOwnerOnly) FN_GLOBAL_BOOL(use_spnego, bUseSpnego) diff --git a/lib/param/param_table.c b/lib/param/param_table.c index a73cd966bc..620f5f679b 100644 --- a/lib/param/param_table.c +++ b/lib/param/param_table.c @@ -1894,6 +1894,15 @@ static struct parm_struct parm_table[] = { .enum_list = NULL, .flags = FLAG_ADVANCED, }, + { + .label = "use ntdb", + .type = P_BOOL, + .p_class = P_GLOBAL, + .offset = GLOBAL_VAR(bUseNtdb), + .special = NULL, + .enum_list = NULL, + .flags = FLAG_ADVANCED, + }, { .label = "use sendfile", .type = P_BOOL, diff --git a/source3/include/proto.h b/source3/include/proto.h index 77b949037b..c36125e53e 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -1161,6 +1161,7 @@ bool lp_client_ntlmv2_auth(void); bool lp_host_msdfs(void); bool lp_enhanced_browsing(void); bool lp_use_mmap(void); +bool lp_use_ntdb(void); bool lp_unix_extensions(void); bool lp_unicode(void); bool lp_use_spnego(void); diff --git a/source3/param/loadparm_ctx.c b/source3/param/loadparm_ctx.c index 75f7e38957..63ead53ac1 100644 --- a/source3/param/loadparm_ctx.c +++ b/source3/param/loadparm_ctx.c @@ -112,6 +112,7 @@ static const struct loadparm_s3_helpers s3_fns = .unix_extensions = lp_unix_extensions, .use_spnego = lp_use_spnego, .use_mmap = lp_use_mmap, + .use_ntdb = lp_use_ntdb, .srv_minprotocol = lp_srv_minprotocol, .srv_maxprotocol = lp_srv_maxprotocol, -- cgit