summaryrefslogtreecommitdiff
path: root/source4/ntvfs/posix
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-12-04 12:42:40 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:06:21 -0500
commit4127edc1afd702ac3bcb77893ba864eb98729451 (patch)
tree60d1ecbe35dc7f2c7d596db3417baeb9195af5ed /source4/ntvfs/posix
parent6a58011be5e00be57ce2280c08ed7e43ad44feb5 (diff)
downloadsamba-4127edc1afd702ac3bcb77893ba864eb98729451.tar.gz
samba-4127edc1afd702ac3bcb77893ba864eb98729451.tar.bz2
samba-4127edc1afd702ac3bcb77893ba864eb98729451.zip
r4062: the RAW-ACLS test now passes. The SEC_STD_DELETE bit is rather strange
though - I expect we'll need to tweak that some more. (This used to be commit e3500811b90b8423ee7694609340f394957d1160)
Diffstat (limited to 'source4/ntvfs/posix')
-rw-r--r--source4/ntvfs/posix/pvfs_open.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source4/ntvfs/posix/pvfs_open.c b/source4/ntvfs/posix/pvfs_open.c
index 17740f7636..a53deda270 100644
--- a/source4/ntvfs/posix/pvfs_open.c
+++ b/source4/ntvfs/posix/pvfs_open.c
@@ -103,6 +103,7 @@ static NTSTATUS pvfs_open_directory(struct pvfs_state *pvfs,
int fnum;
NTSTATUS status;
uint32_t create_action;
+ uint32_t access_mask = io->generic.in.access_mask;
if (name->stream_name) {
return NT_STATUS_NOT_A_DIRECTORY;
@@ -152,6 +153,14 @@ static NTSTATUS pvfs_open_directory(struct pvfs_state *pvfs,
return NT_STATUS_TOO_MANY_OPENED_FILES;
}
+ if (name->exists) {
+ /* check the security descriptor */
+ status = pvfs_access_check(pvfs, req, name, &access_mask);
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+ }
+
f->fnum = fnum;
f->session = req->session;
f->smbpid = req->smbpid;
@@ -160,6 +169,7 @@ static NTSTATUS pvfs_open_directory(struct pvfs_state *pvfs,
f->lock_count = 0;
f->share_access = io->generic.in.share_access;
f->impersonation = io->generic.in.impersonation;
+ f->access_mask = access_mask;
f->handle->pvfs = pvfs;
f->handle->name = talloc_steal(f->handle, name);