summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-06-09 18:47:26 +0200
committerStefan Metzmacher <metze@samba.org>2009-06-09 19:51:02 +0200
commitc8b3030f4042eb0b5f57415ad23d99d0cb28460e (patch)
treeb0368e95951266db0114155dcea9c42b2ea427ed /source3
parentc0b64051d3dd715b9fc6192e758695e4202bbb5a (diff)
downloadsamba-c8b3030f4042eb0b5f57415ad23d99d0cb28460e.tar.gz
samba-c8b3030f4042eb0b5f57415ad23d99d0cb28460e.tar.bz2
samba-c8b3030f4042eb0b5f57415ad23d99d0cb28460e.zip
s3:smbd: skip file handle checks for SMB2 compounded requests
metze
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/smb2_close.c4
-rw-r--r--source3/smbd/smb2_flush.c4
-rw-r--r--source3/smbd/smb2_ioctl.c6
-rw-r--r--source3/smbd/smb2_read.c4
-rw-r--r--source3/smbd/smb2_write.c4
5 files changed, 16 insertions, 6 deletions
diff --git a/source3/smbd/smb2_close.c b/source3/smbd/smb2_close.c
index a600498b2d..6724e5cc15 100644
--- a/source3/smbd/smb2_close.c
+++ b/source3/smbd/smb2_close.c
@@ -56,7 +56,9 @@ NTSTATUS smbd_smb2_request_process_close(struct smbd_smb2_request *req)
in_file_id_persistent = BVAL(inbody, 0x08);
in_file_id_volatile = BVAL(inbody, 0x10);
- if (in_file_id_persistent != 0) {
+ if (req->compat_chain_fsp) {
+ /* skip check */
+ } else if (in_file_id_persistent != 0) {
return smbd_smb2_request_error(req, NT_STATUS_FILE_CLOSED);
}
diff --git a/source3/smbd/smb2_flush.c b/source3/smbd/smb2_flush.c
index 37a8309b33..ce560a1362 100644
--- a/source3/smbd/smb2_flush.c
+++ b/source3/smbd/smb2_flush.c
@@ -55,7 +55,9 @@ NTSTATUS smbd_smb2_request_process_flush(struct smbd_smb2_request *req)
in_file_id_persistent = BVAL(inbody, 0x08);
in_file_id_volatile = BVAL(inbody, 0x10);
- if (in_file_id_persistent != 0) {
+ if (req->compat_chain_fsp) {
+ /* skip check */
+ } else if (in_file_id_persistent != 0) {
return smbd_smb2_request_error(req, NT_STATUS_FILE_CLOSED);
}
diff --git a/source3/smbd/smb2_ioctl.c b/source3/smbd/smb2_ioctl.c
index 9ff6c8ea97..a1f2885668 100644
--- a/source3/smbd/smb2_ioctl.c
+++ b/source3/smbd/smb2_ioctl.c
@@ -83,8 +83,10 @@ NTSTATUS smbd_smb2_request_process_ioctl(struct smbd_smb2_request *req)
in_input_buffer.data = (uint8_t *)req->in.vector[i+2].iov_base;
in_input_buffer.length = in_input_length;
- if (in_file_id_persistent == UINT64_MAX &&
- in_file_id_volatile == UINT64_MAX) {
+ if (req->compat_chain_fsp) {
+ /* skip check */
+ } else if (in_file_id_persistent == UINT64_MAX &&
+ in_file_id_volatile == UINT64_MAX) {
/* without a handle */
} else if (in_file_id_persistent != 0) {
return smbd_smb2_request_error(req, NT_STATUS_FILE_CLOSED);
diff --git a/source3/smbd/smb2_read.c b/source3/smbd/smb2_read.c
index ae6b0f4449..5890ca6c42 100644
--- a/source3/smbd/smb2_read.c
+++ b/source3/smbd/smb2_read.c
@@ -81,7 +81,9 @@ NTSTATUS smbd_smb2_request_process_read(struct smbd_smb2_request *req)
return smbd_smb2_request_error(req, NT_STATUS_INVALID_PARAMETER);
}
- if (in_file_id_persistent != 0) {
+ if (req->compat_chain_fsp) {
+ /* skip check */
+ } else if (in_file_id_persistent != 0) {
return smbd_smb2_request_error(req, NT_STATUS_FILE_CLOSED);
}
diff --git a/source3/smbd/smb2_write.c b/source3/smbd/smb2_write.c
index 43a312ad7e..ccfe3b3434 100644
--- a/source3/smbd/smb2_write.c
+++ b/source3/smbd/smb2_write.c
@@ -90,7 +90,9 @@ NTSTATUS smbd_smb2_request_process_write(struct smbd_smb2_request *req)
in_data_buffer.data = (uint8_t *)req->in.vector[i+2].iov_base;
in_data_buffer.length = in_data_length;
- if (in_file_id_persistent != 0) {
+ if (req->compat_chain_fsp) {
+ /* skip check */
+ } else if (in_file_id_persistent != 0) {
return smbd_smb2_request_error(req, NT_STATUS_FILE_CLOSED);
}