From 460e280d3af70c38b04219e414ea3b6439caaed6 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 9 Aug 2024 11:08:17 +0200 Subject: [PATCH] docs-xml: add 'vfs mkdir use tmp name' option BUG: https://bugzilla.samba.org/show_bug.cgi?id=15693 Signed-off-by: Stefan Metzmacher Reviewed-by: Ralph Boehme --- .../smbdotconf/vfs/vfsmkdirusetmpname.xml | 47 +++++++++++++++++++ lib/param/loadparm.c | 2 + source3/param/loadparm.c | 1 + 3 files changed, 50 insertions(+) create mode 100644 docs-xml/smbdotconf/vfs/vfsmkdirusetmpname.xml diff --git a/docs-xml/smbdotconf/vfs/vfsmkdirusetmpname.xml b/docs-xml/smbdotconf/vfs/vfsmkdirusetmpname.xml new file mode 100644 index 00000000000..92a39f8f541 --- /dev/null +++ b/docs-xml/smbdotconf/vfs/vfsmkdirusetmpname.xml @@ -0,0 +1,47 @@ + + + + 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. + + + + Other clients should not see the existence of the directory that + is in progress of being created! + + + + This option is an enumerated type that controls the usage of a temporary directory name. + When this is set to yes, + the directory name will be prefixed with '.::TMPNAME:D:$SERVERID:' (where $SERVERID is + a unique identifier for the current process). + + + + 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 no: + , + , + , + or + . + + + + A re-export of an SMB/CIFS mount might one rare case where + vfs mkdir use tmp name = no could be useful. + + + + In most cases vfs mkdir use tmp name = Auto should be kept. + + +Auto + + diff --git a/lib/param/loadparm.c b/lib/param/loadparm.c index ed5160d547b..047c59d3c6b 100644 --- a/lib/param/loadparm.c +++ b/lib/param/loadparm.c @@ -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"); diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index f9bc1c42796..557567d927f 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -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, -- 2.47.3