const struct smb2_create_blobs *in_context_blobs,
struct smb2_create_blobs *out_context_blobs)
{
+ struct smb2_create_blob *svhdx = NULL;
+
+ /*
+ * It might be empty ... and smb2_create_blob_find does not handle that
+ */
+ if (in_context_blobs) {
+ svhdx = smb2_create_blob_find(in_context_blobs,
+ SVHDX_OPEN_DEVICE_CONTEXT);
+ }
+
+ if (svhdx != NULL) {
+ /* SharedVHD is not yet supported */
+ DEBUG(10, ("Shared VHD not yet supported, INVALID_DEVICE_REQUEST\n"));
+ return NT_STATUS_INVALID_DEVICE_REQUEST;
+ }
+
return create_file_default(handle->conn, req, root_dir_fid, smb_fname,
access_mask, share_access,
create_disposition, create_options,
}
}
- if (svhdx != NULL) {
- /* SharedVHD is not yet supported */
- tevent_req_nterror(
- req, NT_STATUS_INVALID_DEVICE_REQUEST);
- return tevent_req_post(req, ev);
- }
-
/* these are ignored for SMB2 */
in_create_options &= ~(0x10);/* NTCREATEX_OPTIONS_SYNC_ALERT */
in_create_options &= ~(0x20);/* NTCREATEX_OPTIONS_ASYNC_ALERT */