summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2008-05-27 14:59:55 +1000
committerAndrew Tridgell <tridge@samba.org>2008-05-27 14:59:55 +1000
commit65e31a965ee6514610ec0d4ca52a5cd8772c5254 (patch)
tree4922f71b45a1cc58688b3bdbe5ec883499471e0b
parent6e265867ff8869254820e8af954c8f1316b05d39 (diff)
downloadsamba-65e31a965ee6514610ec0d4ca52a5cd8772c5254.tar.gz
samba-65e31a965ee6514610ec0d4ca52a5cd8772c5254.tar.bz2
samba-65e31a965ee6514610ec0d4ca52a5cd8772c5254.zip
make the SEC_STD_SYNCHRONIZE test more specific
(This used to be commit 8c263f91bda97eb910c8589b6cd987ec4a62d770)
-rw-r--r--source4/ntvfs/posix/pvfs_open.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source4/ntvfs/posix/pvfs_open.c b/source4/ntvfs/posix/pvfs_open.c
index 739c127b98..cfa88b6baa 100644
--- a/source4/ntvfs/posix/pvfs_open.c
+++ b/source4/ntvfs/posix/pvfs_open.c
@@ -1155,13 +1155,16 @@ NTSTATUS pvfs_open(struct ntvfs_module_context *ntvfs,
return NT_STATUS_ACCESS_DENIED;
}
+ /* what does this bit really mean?? */
if (req->ctx->protocol == PROTOCOL_SMB2 &&
- (access_mask & SEC_STD_SYNCHRONIZE)) {
+ (access_mask & SEC_STD_SYNCHRONIZE) &&
+ !(access_mask & SEC_STD_READ_CONTROL)) {
return NT_STATUS_ACCESS_DENIED;
}
if (io->ntcreatex.in.file_attr & (FILE_ATTRIBUTE_DEVICE|
- FILE_ATTRIBUTE_VOLUME)) {
+ FILE_ATTRIBUTE_VOLUME|
+ (~FILE_ATTRIBUTE_ALL_MASK))) {
return NT_STATUS_INVALID_PARAMETER;
}