summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-08-05 15:00:23 +0200
committerStefan Metzmacher <metze@samba.org>2012-08-05 20:55:36 +0200
commit926379ae79a11bca78c6bf5a93b5aea1e3643094 (patch)
tree27a662917abb1e9942b414ac562bc6a7ce71138e /source3/smbd
parent559742f45f5e220d2f69ea2929f7c04c42c35192 (diff)
downloadsamba-926379ae79a11bca78c6bf5a93b5aea1e3643094.tar.gz
samba-926379ae79a11bca78c6bf5a93b5aea1e3643094.tar.bz2
samba-926379ae79a11bca78c6bf5a93b5aea1e3643094.zip
s3:smb2_find: make use of SMBD_SMB2_* macros
metze
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/smb2_find.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/source3/smbd/smb2_find.c b/source3/smbd/smb2_find.c
index bb5e934a87..c2c0559371 100644
--- a/source3/smbd/smb2_find.c
+++ b/source3/smbd/smb2_find.c
@@ -43,7 +43,6 @@ NTSTATUS smbd_smb2_request_process_find(struct smbd_smb2_request *req)
{
NTSTATUS status;
const uint8_t *inbody;
- int i = req->current_idx;
uint8_t in_file_info_class;
uint8_t in_flags;
uint32_t in_file_index;
@@ -63,7 +62,7 @@ NTSTATUS smbd_smb2_request_process_find(struct smbd_smb2_request *req)
if (!NT_STATUS_IS_OK(status)) {
return smbd_smb2_request_error(req, status);
}
- inbody = (const uint8_t *)req->in.vector[i+1].iov_base;
+ inbody = SMBD_SMB2_IN_BODY_PTR(req);
in_file_info_class = CVAL(inbody, 0x02);
in_flags = CVAL(inbody, 0x03);
@@ -77,11 +76,11 @@ NTSTATUS smbd_smb2_request_process_find(struct smbd_smb2_request *req)
if (in_file_name_offset == 0 && in_file_name_length == 0) {
/* This is ok */
} else if (in_file_name_offset !=
- (SMB2_HDR_BODY + req->in.vector[i+1].iov_len)) {
+ (SMB2_HDR_BODY + SMBD_SMB2_IN_BODY_LEN(req))) {
return smbd_smb2_request_error(req, NT_STATUS_INVALID_PARAMETER);
}
- if (in_file_name_length > req->in.vector[i+2].iov_len) {
+ if (in_file_name_length > SMBD_SMB2_IN_DYN_LEN(req)) {
return smbd_smb2_request_error(req, NT_STATUS_INVALID_PARAMETER);
}
@@ -96,7 +95,7 @@ NTSTATUS smbd_smb2_request_process_find(struct smbd_smb2_request *req)
/* Take into account the output header. */
in_output_buffer_length -= 8;
- in_file_name_buffer.data = (uint8_t *)req->in.vector[i+2].iov_base;
+ in_file_name_buffer.data = SMBD_SMB2_IN_DYN_PTR(req);
in_file_name_buffer.length = in_file_name_length;
ok = convert_string_talloc(req, CH_UTF16, CH_UNIX,