diff options
author | Andrew Tridgell <tridge@samba.org> | 2008-05-27 14:07:11 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2008-05-27 14:07:11 +1000 |
commit | f0b4b15f64259fcdb18f21657434f592bb2f157e (patch) | |
tree | 109a18dce575d60a7dee32e0e1005ff88edc5ab3 | |
parent | 9a37e7ed93dabd1880513d10afc1135049f1fb4a (diff) | |
download | samba-f0b4b15f64259fcdb18f21657434f592bb2f157e.tar.gz samba-f0b4b15f64259fcdb18f21657434f592bb2f157e.tar.bz2 samba-f0b4b15f64259fcdb18f21657434f592bb2f157e.zip |
check for some more invalid bits in smb2 create
(This used to be commit dcdaa9f5fd9150b16fb277213e864e5c39d831d6)
-rw-r--r-- | source4/ntvfs/posix/pvfs_open.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source4/ntvfs/posix/pvfs_open.c b/source4/ntvfs/posix/pvfs_open.c index 59b42fe751..328f064a57 100644 --- a/source4/ntvfs/posix/pvfs_open.c +++ b/source4/ntvfs/posix/pvfs_open.c @@ -1147,6 +1147,15 @@ NTSTATUS pvfs_open(struct ntvfs_module_context *ntvfs, return NT_STATUS_INVALID_PARAMETER; } + if (access_mask & (SEC_MASK_INVALID | SEC_STD_SYNCHRONIZE)) { + return NT_STATUS_ACCESS_DENIED; + } + + if (io->ntcreatex.in.file_attr & (FILE_ATTRIBUTE_DEVICE| + FILE_ATTRIBUTE_VOLUME)) { + return NT_STATUS_INVALID_PARAMETER; + } + /* resolve the cifs name to a posix name */ status = pvfs_resolve_name(pvfs, req, io->ntcreatex.in.fname, PVFS_RESOLVE_STREAMS, &name); |