From 245a325532c9a46ec3e459ceca38e903b203f691 Mon Sep 17 00:00:00 2001 From: Uri Simchoni Date: Thu, 23 Mar 2017 14:08:45 +0200 Subject: [PATCH] vfs_fruit: enable zero file id Enable zero_file_id if both conditions are met: - AAPL negotiated - fruit:zero_file_id is set BUG: https://bugzilla.samba.org/show_bug.cgi?id=12715 Signed-off-by: Uri Simchoni Reviewed-by: Ralph Boehme --- source3/modules/vfs_fruit.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c index fc806297d96..0b5558a4487 100644 --- a/source3/modules/vfs_fruit.c +++ b/source3/modules/vfs_fruit.c @@ -135,6 +135,7 @@ struct fruit_config_data { bool copyfile_enabled; bool veto_appledouble; bool posix_rename; + bool aapl_zero_file_id; /* * Additional options, all enabled by default, @@ -1591,6 +1592,9 @@ static int init_fruit_config(vfs_handle_struct *handle) config->posix_rename = lp_parm_bool( SNUM(handle->conn), FRUIT_PARAM_TYPE_NAME, "posix_rename", true); + config->aapl_zero_file_id = + lp_parm_bool(-1, FRUIT_PARAM_TYPE_NAME, "zero_file_id", true); + config->readdir_attr_rsize = lp_parm_bool( SNUM(handle->conn), "readdir_attr", "aapl_rsize", true); @@ -2236,6 +2240,9 @@ static NTSTATUS check_aapl(vfs_handle_struct *handle, blob); if (NT_STATUS_IS_OK(status)) { global_fruit_config.nego_aapl = true; + if (config->aapl_zero_file_id) { + aapl_force_zero_file_id(handle->conn->sconn); + } } return status; -- 2.11.4.GIT