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:39 +0200
commite9a21e5c8b24c9fc01940a1b0d29803b9edf7470 (patch)
tree6998c8e6e3b886216d0562e20cd12a79863a7f5e /source3/smbd
parentf28b2ac65a58a99e694206522a853cfdc32a5e85 (diff)
downloadsamba-e9a21e5c8b24c9fc01940a1b0d29803b9edf7470.tar.gz
samba-e9a21e5c8b24c9fc01940a1b0d29803b9edf7470.tar.bz2
samba-e9a21e5c8b24c9fc01940a1b0d29803b9edf7470.zip
s3:smb2_negprot: make use of SMBD_SMB2_* macros
metze
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/smb2_negprot.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source3/smbd/smb2_negprot.c b/source3/smbd/smb2_negprot.c
index 66d64cf338..d086566d5c 100644
--- a/source3/smbd/smb2_negprot.c
+++ b/source3/smbd/smb2_negprot.c
@@ -85,7 +85,6 @@ NTSTATUS smbd_smb2_request_process_negprot(struct smbd_smb2_request *req)
NTSTATUS status;
const uint8_t *inbody;
const uint8_t *indyn = NULL;
- int i = req->current_idx;
DATA_BLOB outbody;
DATA_BLOB outdyn;
DATA_BLOB negprot_spnego_blob;
@@ -114,7 +113,7 @@ NTSTATUS smbd_smb2_request_process_negprot(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);
dialect_count = SVAL(inbody, 0x02);
@@ -132,10 +131,10 @@ NTSTATUS smbd_smb2_request_process_negprot(struct smbd_smb2_request *req)
}
expected_dyn_size = dialect_count * 2;
- if (req->in.vector[i+2].iov_len < expected_dyn_size) {
+ if (SMBD_SMB2_IN_DYN_LEN(req) < expected_dyn_size) {
return smbd_smb2_request_error(req, NT_STATUS_INVALID_PARAMETER);
}
- indyn = (const uint8_t *)req->in.vector[i+2].iov_base;
+ indyn = SMBD_SMB2_IN_DYN_PTR(req);
for (c=0; protocol == PROTOCOL_NONE && c < dialect_count; c++) {
if (lp_srv_maxprotocol() < PROTOCOL_SMB3_00) {