diff options
author | Jeremy Allison <jra@samba.org> | 2014-10-24 13:57:04 -0700 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2014-11-04 21:19:12 +0100 |
commit | 4ff4c58ee75887b8e5e4ea3752eb0d82e13e903a (patch) | |
tree | ca05f3ef52f8926808b4c7a6a864437a5bb2d673 | |
parent | b5275259290ae468c9047ef5a1e27b7f113c9718 (diff) | |
download | samba-4ff4c58ee75887b8e5e4ea3752eb0d82e13e903a.tar.gz |
s3:param: Add new option "strict rename".
Control whether smbd can rename directories containing
open files. Defaults to "no" (meaning we *can* do
such renames).
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit b0a434386dc2f77df89811bc3f56c4cc7fb7b16c)
-rw-r--r-- | docs-xml/smbdotconf/tuning/strictrename.xml | 25 | ||||
-rw-r--r-- | lib/param/param_table.c | 9 | ||||
-rw-r--r-- | source3/param/loadparm.c | 1 |
3 files changed, 35 insertions, 0 deletions
diff --git a/docs-xml/smbdotconf/tuning/strictrename.xml b/docs-xml/smbdotconf/tuning/strictrename.xml new file mode 100644 index 00000000000..54788634d8d --- /dev/null +++ b/docs-xml/smbdotconf/tuning/strictrename.xml @@ -0,0 +1,25 @@ +<samba:parameter name="strict rename" + context="S" + type="boolean" + xmlns:samba="http://www.samba.org/samba/DTD/samba-doc"> +<description> + <para>By default a Windows SMB server prevents directory + renames when there are open file or directory handles below + it in the filesystem hierarchy. Historically Samba has always + allowed this as POSIX filesystem semantics require it.</para> + + <para>This boolean parameter allows Samba to match the Windows + behavior. Setting this to "yes" is a very expensive change, + as it forces Samba to travers the entire open file handle + database on every directory rename request. In a clustered + Samba system the cost is even greater than the non-clustered + case.</para> + + <para>For this reason the default is "no", and it is recommended + to be left that way unless a specific Windows application requires + it to be changed.</para> + +</description> + +<value type="default">no</value> +</samba:parameter> diff --git a/lib/param/param_table.c b/lib/param/param_table.c index d3f60c3818a..4d0e6a99824 100644 --- a/lib/param/param_table.c +++ b/lib/param/param_table.c @@ -1882,6 +1882,15 @@ struct parm_struct parm_table[] = { .flags = FLAG_ADVANCED | FLAG_SHARE, }, { + .label = "strict rename", + .type = P_BOOL, + .p_class = P_LOCAL, + .offset = LOCAL_VAR(strict_rename), + .special = NULL, + .enum_list = NULL, + .flags = FLAG_ADVANCED | FLAG_SHARE, + }, + { .label = "strict sync", .type = P_BOOL, .p_class = P_LOCAL, diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 5ab0de71104..884cc45e25c 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -206,6 +206,7 @@ static struct loadparm_service sDefault = .follow_symlinks = true, .sync_always = false, .strict_allocate = false, + .strict_rename = false, .strict_sync = false, .mangling_char = '~', .copymap = NULL, |