From 8ec28c6d183a2c6adb137b853614e66d622c0878 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Wed, 25 Mar 2015 15:09:02 +0100 Subject: [PATCH 1/2] vfs_fruit: add option "nfs_aces" that controls the NFS ACEs stuff Bug: https://bugzilla.samba.org/show_bug.cgi?id=11213 Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison (cherry picked from commit 1b8a0e6a26bc212905a160c32b936ef0ea24c0b2) --- docs-xml/manpages/vfs_fruit.8.xml | 9 +++++++++ source3/modules/vfs_fruit.c | 9 +++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/docs-xml/manpages/vfs_fruit.8.xml b/docs-xml/manpages/vfs_fruit.8.xml index a9e2e6d..4e296a4 100644 --- a/docs-xml/manpages/vfs_fruit.8.xml +++ b/docs-xml/manpages/vfs_fruit.8.xml @@ -188,6 +188,15 @@ + + fruit:nfs_aces = yes | no + + Whether support for querying and modifying the + UNIX mode of directory entries via NFS ACEs is enabled, + default yes. + + + diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c index 980cbc4..a810746 100644 --- a/source3/modules/vfs_fruit.c +++ b/source3/modules/vfs_fruit.c @@ -1336,6 +1336,10 @@ static int init_fruit_config(vfs_handle_struct *handle) config->use_aapl = true; } + if (lp_parm_bool(-1, FRUIT_PARAM_TYPE_NAME, "nfs_aces", true)) { + config->unix_info_enabled = true; + } + if (lp_parm_bool(SNUM(handle->conn), "readdir_attr", "aapl_rsize", true)) { config->readdir_attr_rsize = true; @@ -1829,8 +1833,9 @@ static NTSTATUS check_aapl(vfs_handle_struct *handle, * The client doesn't set the flag, so we can't check * for it and just set it unconditionally */ - server_caps |= SMB2_CRTCTX_AAPL_SUPPORTS_NFS_ACE; - config->unix_info_enabled = true; + if (config->unix_info_enabled) { + server_caps |= SMB2_CRTCTX_AAPL_SUPPORTS_NFS_ACE; + } SBVAL(p, 0, server_caps); ok = data_blob_append(req, &blob, p, 8); -- 2.1.0 From 74a89402ca12a960ec64fe9f2527f9b6994bb7dd Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Wed, 25 Mar 2015 12:56:07 +0100 Subject: [PATCH 2/2] vfs_fruit: comment fix: the options are documented Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Fri May 8 21:27:45 CEST 2015 on sn-devel-104 (cherry picked from commit fe93f7d677995c41e15d4af68b4ec064796a4d5b) --- source3/modules/vfs_fruit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c index a810746..adf283b 100644 --- a/source3/modules/vfs_fruit.c +++ b/source3/modules/vfs_fruit.c @@ -127,7 +127,7 @@ struct fruit_config_data { bool unix_info_enabled; /* - * Additional undocumented options, all enabled by default, + * Additional options, all enabled by default, * possibly useful for analyzing performance. The associated * operations with each of them may be expensive, so having * the chance to disable them individually gives a chance -- 2.1.0