diff options
author | Ralph Boehme <slow@samba.org> | 2017-02-28 09:39:37 +0100 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2017-03-13 09:23:13 +0100 |
commit | b86d92b9399b9d2156228831a7dbd1091028a6d1 (patch) | |
tree | 204b962c17f5f61ed26f684103869d00a92970bc | |
parent | 083ff22e0a89b6efb982c750c3ebb39130626516 (diff) | |
download | samba-b86d92b9399b9d2156228831a7dbd1091028a6d1.tar.gz |
vfs_fruit: enabling AAPL extensions must be a global switch
Apple's SMB2 AAPL extension is enabled once per SMB2
connection. Unfortunately the (per se correct) fix for bug #12541
results in vfs_fruit checking a per tcon config state variable to
determine whether AAPL has been negotiated. This variable will be false
for all but the first tcon. We must make it a global variable.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=12604
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Autobuild-User(master): Uri Simchoni <uri@samba.org>
Autobuild-Date(master): Thu Mar 2 04:34:10 CET 2017 on sn-devel-144
(cherry picked from commit 41204a4972ea62b7b656ad81e24bd052990f7e87)
-rw-r--r-- | source3/modules/vfs_fruit.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c index 10334ff845e..6ef27da1e0e 100644 --- a/source3/modules/vfs_fruit.c +++ b/source3/modules/vfs_fruit.c @@ -94,6 +94,11 @@ static int vfs_fruit_debug_level = DBGC_VFS; +static struct global_fruit_config { + bool nego_aapl; /* client negotiated AAPL */ + +} global_fruit_config; + #undef DBGC_CLASS #define DBGC_CLASS vfs_fruit_debug_level @@ -126,7 +131,6 @@ struct fruit_config_data { enum fruit_locking locking; enum fruit_encoding encoding; bool use_aapl; /* config from smb.conf */ - bool nego_aapl; /* client negotiated AAPL */ bool use_copyfile; bool readdir_attr_enabled; bool unix_info_enabled; @@ -1935,7 +1939,7 @@ static NTSTATUS check_aapl(vfs_handle_struct *handle, SMB2_CREATE_TAG_AAPL, blob); if (NT_STATUS_IS_OK(status)) { - config->nego_aapl = true; + global_fruit_config.nego_aapl = true; } return status; @@ -3422,7 +3426,7 @@ static NTSTATUS fruit_create_file(vfs_handle_struct *handle, fsp = *result; - if (config->nego_aapl) { + if (global_fruit_config.nego_aapl) { if (config->copyfile_enabled) { /* * Set a flag in the fsp. Gets used in @@ -3499,7 +3503,7 @@ static NTSTATUS fruit_readdir_attr(struct vfs_handle_struct *handle, struct fruit_config_data, return NT_STATUS_UNSUCCESSFUL); - if (!config->nego_aapl) { + if (!global_fruit_config.nego_aapl) { return SMB_VFS_NEXT_READDIR_ATTR(handle, fname, mem_ctx, pattr_data); } |