empty access mask is only denied on SMB2
[kai/samba.git] / source4 / ntvfs / posix / pvfs_acl.c
index 06a4e690041a190bcdaaf5fd2122019f7a79aac7..d479f1e2ee0e452ec48243d3a6db4ec7d9e14a68 100644 (file)
@@ -511,7 +511,9 @@ NTSTATUS pvfs_access_check(struct pvfs_state *pvfs,
        NTSTATUS status;
        struct security_descriptor *sd;
 
        NTSTATUS status;
        struct security_descriptor *sd;
 
-       if (*access_mask == 0) {
+       /* on SMB2 a blank access mask is always denied */
+       if (pvfs->ntvfs->ctx->protocol == PROTOCOL_SMB2 &&
+           *access_mask == 0) {
                return NT_STATUS_ACCESS_DENIED;
        }
 
                return NT_STATUS_ACCESS_DENIED;
        }