summaryrefslogtreecommitdiff
path: root/source3/smbd/smb2_server.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd/smb2_server.c')
-rw-r--r--source3/smbd/smb2_server.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c
index f1c615b2240..b5a831f6df0 100644
--- a/source3/smbd/smb2_server.c
+++ b/source3/smbd/smb2_server.c
@@ -64,7 +64,6 @@ static const struct smbd_smb2_dispatch_table {
bool need_tcon;
bool as_root;
uint16_t fileid_ofs;
- bool allow_invalid_fileid;
bool modify;
} smbd_smb2_table[] = {
#define _OP(o) .opcode = o, .name = #o
@@ -129,7 +128,6 @@ static const struct smbd_smb2_dispatch_table {
.need_session = true,
.need_tcon = true,
.fileid_ofs = 0x08,
- .allow_invalid_fileid = true,
.modify = true,
},{
_OP(SMB2_OP_CANCEL),
@@ -3218,16 +3216,12 @@ NTSTATUS smbd_smb2_request_dispatch(struct smbd_smb2_request *req)
fsp = file_fsp_smb2(req, file_id_persistent, file_id_volatile);
if (fsp == NULL) {
- if (!call->allow_invalid_fileid) {
- return smbd_smb2_request_error(req,
- NT_STATUS_FILE_CLOSED);
- }
-
- if (file_id_persistent != UINT64_MAX) {
- return smbd_smb2_request_error(req,
- NT_STATUS_FILE_CLOSED);
- }
- if (file_id_volatile != UINT64_MAX) {
+ /*
+ * smbd_smb2_request_process_ioctl()
+ * has more checks in order to return more
+ * detailed error codes...
+ */
+ if (opcode != SMB2_OP_IOCTL) {
return smbd_smb2_request_error(req,
NT_STATUS_FILE_CLOSED);
}