summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/modules/vfs_fruit.c26
1 files changed, 17 insertions, 9 deletions
diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c
index 461311cbc61..02906c621d8 100644
--- a/source3/modules/vfs_fruit.c
+++ b/source3/modules/vfs_fruit.c
@@ -123,7 +123,8 @@ struct fruit_config_data {
enum fruit_meta meta;
enum fruit_locking locking;
enum fruit_encoding encoding;
- bool use_aapl;
+ bool use_aapl; /* config from smb.conf */
+ bool nego_aapl; /* client negotiated AAPL */
bool use_copyfile;
bool readdir_attr_enabled;
bool unix_info_enabled;
@@ -1901,6 +1902,9 @@ static NTSTATUS check_aapl(vfs_handle_struct *handle,
out_context_blobs,
SMB2_CREATE_TAG_AAPL,
blob);
+ if (NT_STATUS_IS_OK(status)) {
+ config->nego_aapl = true;
+ }
return status;
}
@@ -3345,16 +3349,20 @@ static NTSTATUS fruit_create_file(vfs_handle_struct *handle,
if (!NT_STATUS_IS_OK(status)) {
return status;
}
+
fsp = *result;
- if (config->copyfile_enabled) {
- /*
- * Set a flag in the fsp. Gets used in copychunk to
- * check whether the special Apple copyfile semantics
- * for copychunk should be allowed in a copychunk
- * request with a count of 0.
- */
- fsp->aapl_copyfile_supported = true;
+ if (config->nego_aapl) {
+ if (config->copyfile_enabled) {
+ /*
+ * Set a flag in the fsp. Gets used in
+ * copychunk to check whether the special
+ * Apple copyfile semantics for copychunk
+ * should be allowed in a copychunk request
+ * with a count of 0.
+ */
+ fsp->aapl_copyfile_supported = true;
+ }
}
/*