1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

r5050: make sure we translate the generic to the specific bits before doing a

pvfs_access_check_unix().

Fixes a problem with the cifsfs filesystem
(This used to be commit 8ebc61a229)
This commit is contained in:
Andrew Tridgell 2005-01-27 23:22:12 +00:00 committed by Gerald (Jerry) Carter
parent 6e2edd67a8
commit cc869963e8

View File

@ -372,6 +372,10 @@ NTSTATUS pvfs_access_check(struct pvfs_state *pvfs,
return NT_STATUS_NO_MEMORY;
}
/* expand the generic access bits to file specific bits */
*access_mask = pvfs_translate_mask(*access_mask);
*access_mask &= ~SEC_FILE_READ_ATTRIBUTE;
status = pvfs_acl_load(pvfs, name, -1, acl);
if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_FOUND)) {
talloc_free(acl);
@ -389,11 +393,6 @@ NTSTATUS pvfs_access_check(struct pvfs_state *pvfs,
return NT_STATUS_INVALID_ACL;
}
/* expand the generic access bits to file specific bits */
*access_mask = pvfs_translate_mask(*access_mask);
*access_mask &= ~SEC_FILE_READ_ATTRIBUTE;
/* check the acl against the required access mask */
status = sec_access_check(sd, token, *access_mask, access_mask);