diff options
author | Andrew Tridgell <tridge@samba.org> | 2008-05-27 14:30:42 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2008-05-27 14:30:42 +1000 |
commit | 6e265867ff8869254820e8af954c8f1316b05d39 (patch) | |
tree | 00772471c38133bcb6e79f684d0d6517710651de /source4/ntvfs | |
parent | 95afe46a0ec550253255f963bc0afe89cf0444ad (diff) | |
download | samba-6e265867ff8869254820e8af954c8f1316b05d39.tar.gz samba-6e265867ff8869254820e8af954c8f1316b05d39.tar.bz2 samba-6e265867ff8869254820e8af954c8f1316b05d39.zip |
SEC_STD_SYNCHRONIZE is only invalid on SMB2
(This used to be commit 067f1271adaa13d537bbc92b19fe8d633cbaaf50)
Diffstat (limited to 'source4/ntvfs')
-rw-r--r-- | source4/ntvfs/posix/pvfs_open.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/source4/ntvfs/posix/pvfs_open.c b/source4/ntvfs/posix/pvfs_open.c index 328f064a57..739c127b98 100644 --- a/source4/ntvfs/posix/pvfs_open.c +++ b/source4/ntvfs/posix/pvfs_open.c @@ -565,6 +565,10 @@ static NTSTATUS pvfs_create_file(struct pvfs_state *pvfs, if (io->ntcreatex.in.file_attr & ~FILE_ATTRIBUTE_ALL_MASK) { return NT_STATUS_INVALID_PARAMETER; } + + if (io->ntcreatex.in.file_attr & FILE_ATTRIBUTE_ENCRYPTED) { + return NT_STATUS_ACCESS_DENIED; + } if ((io->ntcreatex.in.file_attr & FILE_ATTRIBUTE_READONLY) && (create_options & NTCREATEX_OPTIONS_DELETE_ON_CLOSE)) { @@ -1147,7 +1151,12 @@ NTSTATUS pvfs_open(struct ntvfs_module_context *ntvfs, return NT_STATUS_INVALID_PARAMETER; } - if (access_mask & (SEC_MASK_INVALID | SEC_STD_SYNCHRONIZE)) { + if (access_mask & SEC_MASK_INVALID) { + return NT_STATUS_ACCESS_DENIED; + } + + if (req->ctx->protocol == PROTOCOL_SMB2 && + (access_mask & SEC_STD_SYNCHRONIZE)) { return NT_STATUS_ACCESS_DENIED; } |