summaryrefslogtreecommitdiff
path: root/source4/ntvfs/ntvfs_generic.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2008-05-27 12:42:43 +1000
committerAndrew Tridgell <tridge@samba.org>2008-05-27 12:42:43 +1000
commit506849f6008386dad5baa287e7e81a73af031622 (patch)
treee78a74292e571ef77e6442cf3a60387f3c4d919f /source4/ntvfs/ntvfs_generic.c
parent2814868e93116bb967a7438d95b6fd407246acc1 (diff)
downloadsamba-506849f6008386dad5baa287e7e81a73af031622.tar.gz
samba-506849f6008386dad5baa287e7e81a73af031622.tar.bz2
samba-506849f6008386dad5baa287e7e81a73af031622.zip
check invalid create options in the right order
(This used to be commit 73dbfb9b4148dbfdc30518c08db4658d189f4160)
Diffstat (limited to 'source4/ntvfs/ntvfs_generic.c')
-rw-r--r--source4/ntvfs/ntvfs_generic.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source4/ntvfs/ntvfs_generic.c b/source4/ntvfs/ntvfs_generic.c
index 9b4f235cde..c5b88da3d1 100644
--- a/source4/ntvfs/ntvfs_generic.c
+++ b/source4/ntvfs/ntvfs_generic.c
@@ -523,9 +523,16 @@ NTSTATUS ntvfs_map_open(struct ntvfs_module_context *ntvfs,
io2->generic.in.sec_desc = NULL;
io2->generic.in.ea_list = NULL;
+ /* we need to check these bits before we check the private mask */
+ if (io2->generic.in.create_options & NTCREATEX_OPTIONS_NOT_SUPPORTED_MASK) {
+ status = NT_STATUS_NOT_SUPPORTED;
+ break;
+ }
+
/* we use a couple of bits of the create options internally */
if (io2->generic.in.create_options & NTCREATEX_OPTIONS_PRIVATE_MASK) {
- return NT_STATUS_INVALID_PARAMETER;
+ status = NT_STATUS_INVALID_PARAMETER;
+ break;
}
status = ntvfs->ops->open(ntvfs, req, io2);