summaryrefslogtreecommitdiff
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:40 +0200
commite67d07f639c55a91724685fdc09942413c022868 (patch)
tree53101955345b6c52f1662e4f4c80b1198f958d6e
parent9c58a0a8709d91fd4f132be4660a662a7512ba3b (diff)
downloadsamba-e67d07f639c55a91724685fdc09942413c022868.tar.gz
samba-e67d07f639c55a91724685fdc09942413c022868.tar.bz2
samba-e67d07f639c55a91724685fdc09942413c022868.zip
s3:smb2_setinfo: make use of SMBD_SMB2_* macros
metze
-rw-r--r--source3/smbd/smb2_setinfo.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/source3/smbd/smb2_setinfo.c b/source3/smbd/smb2_setinfo.c
index 32fbcca43c..1b79a64133 100644
--- a/source3/smbd/smb2_setinfo.c
+++ b/source3/smbd/smb2_setinfo.c
@@ -41,7 +41,6 @@ NTSTATUS smbd_smb2_request_process_setinfo(struct smbd_smb2_request *req)
{
NTSTATUS status;
const uint8_t *inbody;
- int i = req->current_idx;
uint8_t in_info_type;
uint8_t in_file_info_class;
uint16_t in_input_buffer_offset;
@@ -57,7 +56,7 @@ NTSTATUS smbd_smb2_request_process_setinfo(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_info_type = CVAL(inbody, 0x02);
in_file_info_class = CVAL(inbody, 0x03);
@@ -71,15 +70,15 @@ NTSTATUS smbd_smb2_request_process_setinfo(struct smbd_smb2_request *req)
if (in_input_buffer_offset == 0 && in_input_buffer_length == 0) {
/* This is ok */
} else if (in_input_buffer_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_input_buffer_length > req->in.vector[i+2].iov_len) {
+ if (in_input_buffer_length > SMBD_SMB2_IN_DYN_LEN(req)) {
return smbd_smb2_request_error(req, NT_STATUS_INVALID_PARAMETER);
}
- in_input_buffer.data = (uint8_t *)req->in.vector[i+2].iov_base;
+ in_input_buffer.data = SMBD_SMB2_IN_DYN_PTR(req);
in_input_buffer.length = in_input_buffer_length;
if (in_input_buffer.length > req->sconn->smb2.max_trans) {