diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-01-27 23:22:12 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:09:17 -0500 |
commit | cc869963e8db57ac4048c3a4bc9f943582574c99 (patch) | |
tree | cb2085c558105d15a809253a337e94e7917b4bc7 /source4/ntvfs/posix | |
parent | 6e2edd67a8a742cd1a45d6dc6b64bf3d153db608 (diff) | |
download | samba-cc869963e8db57ac4048c3a4bc9f943582574c99.tar.gz samba-cc869963e8db57ac4048c3a4bc9f943582574c99.tar.bz2 samba-cc869963e8db57ac4048c3a4bc9f943582574c99.zip |
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 8ebc61a2297176515d767ef0f67ec912293ab905)
Diffstat (limited to 'source4/ntvfs/posix')
-rw-r--r-- | source4/ntvfs/posix/pvfs_acl.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/source4/ntvfs/posix/pvfs_acl.c b/source4/ntvfs/posix/pvfs_acl.c index c2856ad292..258d4e5bcb 100644 --- a/source4/ntvfs/posix/pvfs_acl.c +++ b/source4/ntvfs/posix/pvfs_acl.c @@ -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); |