vfs_fruit: only do cross protocol locking on non-internal opens
authorRalph Boehme <slow@samba.org>
Thu, 23 May 2019 14:22:39 +0000 (16:22 +0200)
committerKarolin Seeger <kseeger@samba.org>
Fri, 21 Jun 2019 07:56:20 +0000 (07:56 +0000)
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13968

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit f5f7d1e9bf7e39933ccf7c874e682f9df80a6fec)

source3/modules/vfs_fruit.c

index 9d0cd3cf727e680158ec6dc667e38ae0ba20f342..b49dbc1a68c2f27587b85ded7835755867f45360 100644 (file)
@@ -6066,7 +6066,9 @@ static NTSTATUS fruit_create_file(vfs_handle_struct *handle,
                return status;
        }
 
-       if (config->locking == FRUIT_LOCKING_NETATALK) {
+       if ((config->locking == FRUIT_LOCKING_NETATALK) &&
+           (fsp->op != NULL))
+       {
                status = fruit_check_access(
                        handle, *result,
                        access_mask,