]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
docs-xml: add 'vfs mkdir use tmp name' option
authorStefan Metzmacher <metze@samba.org>
Fri, 9 Aug 2024 09:08:17 +0000 (11:08 +0200)
committerStefan Metzmacher <metze@samba.org>
Wed, 21 Aug 2024 08:02:30 +0000 (08:02 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15693

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
docs-xml/smbdotconf/vfs/vfsmkdirusetmpname.xml [new file with mode: 0644]
lib/param/loadparm.c
source3/param/loadparm.c

diff --git a/docs-xml/smbdotconf/vfs/vfsmkdirusetmpname.xml b/docs-xml/smbdotconf/vfs/vfsmkdirusetmpname.xml
new file mode 100644 (file)
index 0000000..92a39f8
--- /dev/null
@@ -0,0 +1,47 @@
+<samba:parameter name="vfs mkdir use tmp name"
+                 context="S"
+                 type="enum"
+                 enumlist="enum_bool_auto"
+                 xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
+<description>
+       <para>
+       Creating a new directory for an SMB client is a very complex task!
+       It includes things like inheriting permissions from the parent directory
+       and storing DOS attributes.
+       </para>
+
+       <para>
+       Other clients should not see the existence of the directory that
+       is in progress of being created!
+       </para>
+
+       <para>
+       This option is an enumerated type that controls the usage of a temporary directory name.
+       When this is set to <constant>yes</constant>,
+       the directory name will be prefixed with '.::TMPNAME:D:$SERVERID:' (where $SERVERID is
+       a unique identifier for the current process).
+       </para>
+
+       <para>
+       When this option is set to Auto (the default), the server uses a temporary directory name
+       if, at least, one of the following options
+       is effectively not set to <constant>no</constant>:
+       <smbconfoption name="inherit acls"/>,
+       <smbconfoption name="inherit owner"/>,
+       <smbconfoption name="inherit permissions"/>,
+       <smbconfoption name="nt acl support"/> or
+       <smbconfoption name="store dos attributes"/>.
+       </para>
+
+       <para>
+       A re-export of an SMB/CIFS mount might one rare case where
+       <command moreinfo="none">vfs mkdir use tmp name = no</command> could be useful.
+       </para>
+
+       <para>
+       In most cases <command moreinfo="none">vfs mkdir use tmp name = Auto</command> should be kept.
+       </para>
+</description>
+<value type="default">Auto</value>
+</samba:parameter>
+
index ed5160d547bcbc2528a6ad7ad57ffd2cd8a23b91..047c59d3c6b5a8d9abe548ec26f1f697c03d8272 100644 (file)
@@ -3095,6 +3095,8 @@ struct loadparm_context *loadparm_init(TALLOC_CTX *mem_ctx)
 
        lpcfg_do_global_parameter(lp_ctx, "store dos attributes", "yes");
 
+       lpcfg_do_global_parameter(lp_ctx, "vfs mkdir use tmp name", "Auto");
+
        lpcfg_do_global_parameter(lp_ctx, "debug encryption", "no");
 
        lpcfg_do_global_parameter(lp_ctx, "spotlight backend", "noindex");
index f9bc1c427961468544002b730ef8a78a65931ed1..557567d927f9af06749e18f3d89000aff77344bd 100644 (file)
@@ -162,6 +162,7 @@ static const struct loadparm_service _sDefault =
        .volume = NULL,
        .fstype = NULL,
        .vfs_objects = NULL,
+       .vfs_mkdir_use_tmp_name = Auto,
        .msdfs_proxy = NULL,
        .aio_write_behind = NULL,
        .dfree_command = NULL,