empty access mask is only denied on SMB2
authorAndrew Tridgell <tridge@samba.org>
Thu, 25 Sep 2008 00:58:15 +0000 (17:58 -0700)
committerAndrew Tridgell <tridge@samba.org>
Thu, 25 Sep 2008 01:10:23 +0000 (18:10 -0700)
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;
 
-       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;
        }