From: Ralph Boehme Date: Sat, 20 Oct 2018 13:28:06 +0000 (+0200) Subject: vfs_fruit: use check on global_fruit_config.nego_aapl for macOS specific behaviour X-Git-Tag: samba-4.8.8~57 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b0657faba457c632f111d3cb4c58d129bbf52689;p=thirdparty%2Fsamba.git vfs_fruit: use check on global_fruit_config.nego_aapl for macOS specific behaviour Ensure any non MS compliant protocol behaviour targetted at supporting macOS clients are only effective if the client negotiated AAPL. Currently this only guards the resource fork which only macOS client are going to use, but subsequent commits add more this at this place. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13646 Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison (cherry picked from commit 046456fca60b9fef38a0cdf5a116883fb1c7dffe) --- diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c index 80b125a3019..a36e131be30 100644 --- a/source3/modules/vfs_fruit.c +++ b/source3/modules/vfs_fruit.c @@ -5867,7 +5867,8 @@ static NTSTATUS fruit_create_file(vfs_handle_struct *handle, * * Cf the vfs_fruit torture tests in test_rfork_create(). */ - if (is_afpresource_stream(fsp->fsp_name) && + if (global_fruit_config.nego_aapl && + is_afpresource_stream(fsp->fsp_name) && create_disposition == FILE_OPEN) { if (fsp->fsp_name->st.st_ex_size == 0) {