s4-pvfs: fixed handling of SEC_FLAG_MAXIMUM_ALLOWED
authorAndrew Tridgell <tridge@samba.org>
Thu, 15 Oct 2009 07:23:42 +0000 (18:23 +1100)
committerAndrew Tridgell <tridge@samba.org>
Thu, 15 Oct 2009 09:02:59 +0000 (20:02 +1100)
The CREATEX_ACCESS test shows that this is used as a bit test, not a
equality test

source4/ntvfs/posix/pvfs_acl.c

index ad7ac5a7494a8f9dc9a8997cfc3a40a0613f103f..7a204b4d43db3839e5967a738280443d7c59e03d 100644 (file)
@@ -516,7 +516,7 @@ NTSTATUS pvfs_access_check_unix(struct pvfs_state *pvfs,
                max_bits |= SEC_STD_ALL;
        }
 
-       if (*access_mask == SEC_FLAG_MAXIMUM_ALLOWED) {
+       if (*access_mask & SEC_FLAG_MAXIMUM_ALLOWED) {
                *access_mask = max_bits;
                return NT_STATUS_OK;
        }