param: 'use ntdb' flag (off by default).
authorRusty Russell <rusty@rustcorp.com.au>
Wed, 20 Feb 2013 04:29:42 +0000 (14:59 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Wed, 20 Feb 2013 04:31:20 +0000 (05:31 +0100)
For simplicity, we use this in the caller to choose between filenames.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
docs-xml/smbdotconf/tuning/usentdb.xml [new file with mode: 0644]
lib/param/param_functions.c
lib/param/param_table.c
source3/include/proto.h
source3/param/loadparm_ctx.c

diff --git a/docs-xml/smbdotconf/tuning/usentdb.xml b/docs-xml/smbdotconf/tuning/usentdb.xml
new file mode 100644 (file)
index 0000000..9a0d2cd
--- /dev/null
@@ -0,0 +1,23 @@
+<samba:parameter name="use ntdb"
+                 context="G"
+                                type="boolean"
+                 xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
+<description>
+    <para>Beginning in Samba 4.1, a growing number of databases can
+    use the NTDB format rather than TDB.
+    </para>
+    <para>If you enable this option these databases will defaul to a
+    <filename>.ntdb</filename> extension rather than
+    <filename>.tdb</filename>: If the <filename>.tdb</filename> file
+    exists, it will automatically be converted to NTDB and renamed to
+    <filename>.tdb.bak</filename>.
+    </para>
+    <para>Filenames explicitly specified in
+    <filename>smb.conf</filename> will be respected (ie. the format
+    will depend on the <filename>.ntdb</filename> or
+    <filename>.tdb</filename> extension).
+    </para>
+</description>
+
+<value type="default">no</value>
+</samba:parameter>
index 852f525c4411af21bcb837ea5989b590f7c34290..4cf3ad7698582e3d76614c61704c38b0b64aa556 100644 (file)
@@ -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)
index a73cd966bc0c13d45993122d722ac1c71e3ecde7..620f5f679b7fccc8aca0a1a3753921b32c61d52d 100644 (file)
@@ -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,
index 77b949037b71c292c1a6a1e163f17757aa538424..c36125e53eff5e3fc15786ebbe0df80d651678cd 100644 (file)
@@ -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);
index 75f7e38957dfd3c117b57ace22600c5c80d5a447..63ead53ac1ba92bbdd16b7bda78504b51738e56e 100644 (file)
@@ -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,