From: Rusty Russell Date: Wed, 20 Feb 2013 04:29:42 +0000 (+1030) Subject: param: 'use ntdb' flag (off by default). X-Git-Tag: tevent-0.9.18~129 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3c9c3029f2bcf10ef614dd9f923d02232db3ac8d;p=thirdparty%2Fsamba.git 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 --- diff --git a/docs-xml/smbdotconf/tuning/usentdb.xml b/docs-xml/smbdotconf/tuning/usentdb.xml new file mode 100644 index 00000000000..9a0d2cde797 --- /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 852f525c441..4cf3ad76985 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 a73cd966bc0..620f5f679b7 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 77b949037b7..c36125e53ef 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 75f7e38957d..63ead53ac1b 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,