ntvfs_generic: fix handling of create_options for SMB2
authorStefan Metzmacher <metze@samba.org>
Thu, 14 Aug 2008 07:52:45 +0000 (09:52 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 14 Aug 2008 11:13:51 +0000 (13:13 +0200)
metze
(This used to be commit cbd585d2a1e179615eba773cb07385524369c686)

source4/ntvfs/ntvfs_generic.c

index 4f3a7e21983743dc8249770c014a2827dc419488..c34bb7125e6834dd8cc1f00c3fd6b3207fa4cc56 100644 (file)
@@ -532,16 +532,14 @@ NTSTATUS ntvfs_map_open(struct ntvfs_module_context *ntvfs,
                }
 
                /* we need to check these bits before we check the private mask */
                }
 
                /* we need to check these bits before we check the private mask */
-               if (io2->generic.in.create_options & NTCREATEX_OPTIONS_NOT_SUPPORTED_MASK) {
+               if (io2->generic.in.create_options & SMB2_CREATE_OPTIONS_NOT_SUPPORTED_MASK) {
                        status = NT_STATUS_NOT_SUPPORTED;
                        break;
                }
 
                        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) {
-                       status = NT_STATUS_INVALID_PARAMETER;
-                       break;
-               }
+               /* TODO: find out why only SMB2 ignores these */
+               io2->generic.in.create_options &= ~NTCREATEX_OPTIONS_SYNC_ALERT;
+               io2->generic.in.create_options &= ~NTCREATEX_OPTIONS_ASYNC_ALERT;
 
                status = ntvfs->ops->open(ntvfs, req, io2);             
                break;
 
                status = ntvfs->ops->open(ntvfs, req, io2);             
                break;