dbgtext("\treq->in.vector[%u].iov_len = %u\n",
(unsigned int)i,
(unsigned int)req->in.vector[i].iov_len);
- dump_data(0, req->in.vector[i].iov_base, req->in.vector[i].iov_len);
}
for (i = 0; i < req->out.vector_count; i++) {
dbgtext("\treq->out.vector[%u].iov_len = %u\n",
(unsigned int)i,
(unsigned int)req->out.vector[i].iov_len);
- dump_data(0, req->out.vector[i].iov_base, req->out.vector[i].iov_len);
}
}
TALLOC_FREE(iov);
return status;
}
- DEBUG(0, ("%s: DECRYPT buflen[%u] taken[%u], len[%u]\n", __location__,
- (unsigned)buflen, (unsigned)taken, (unsigned)len));
- dump_data(0,buf, buflen);
verified_buflen = taken + enc_len;
len = enc_len;
if (SVAL(hdr, 4) != SMB2_HDR_BODY) {
DEBUG(10, ("Got HDR len %d, expected %d\n",
SVAL(hdr, 4), SMB2_HDR_BODY));
- DEBUG(10,(":%s: HERE INVALID\n", __location__));
goto inval;
}
if (next_command_ofs != 0) {
if (next_command_ofs < (SMB2_HDR_BODY + 2)) {
- DEBUG(10,(":%s: HERE INVALID\n", __location__));
goto inval;
}
if (next_command_ofs > full_size) {
- DEBUG(10,(":%s: HERE INVALID\n", __location__));
goto inval;
}
- if (tf && next_command_ofs < len) {
- DEBUG(0,(":%s: HERE INVALID: next_command_ofs[%u] len[%u] buflen[%u] taken[%u]\n",
- __location__,
- (unsigned)next_command_ofs,
- (unsigned)len,
- (unsigned)buflen,
- (unsigned)taken));
- // dump_data(0,buf, buflen);
- // goto inval;
- }
full_size = next_command_ofs;
}
if (body_size < 2) {
- DEBUG(10,(":%s: HERE INVALID\n", __location__));
goto inval;
}
body_size &= 0xfffe;
return NT_STATUS_OK;
inval:
- DEBUG(10,(":%s: HERE INVALID\n", __location__));
TALLOC_FREE(iov);
return NT_STATUS_INVALID_PARAMETER;
}
smb2_setup_nbt_length(newreq->out.vector,
newreq->out.vector_count);
- if (DEBUGLEVEL >= 10) {
- dbgtext("dup_smb2_req: req->current_idx = %u\n",
- (unsigned int)req->current_idx );
- dbgtext("dup_smb2_req: returning %u vectors\n",
- (unsigned int)req->out.vector_count );
- print_req_vectors(req);
- dbgtext("dup_smb2_req: newreq->current_idx = %u\n",
- (unsigned int)newreq->current_idx );
- dbgtext("dup_smb2_req: returning %u vectors\n",
- (unsigned int)newreq->out.vector_count );
- print_req_vectors(newreq);
- }
return newreq;
}
}
}
- if (DEBUGLEVEL >= 10) {
- dbgtext("smb2_send_async_interim_response out: nreq->current_idx = %u\n",
- (unsigned int)nreq->current_idx );
- dbgtext("smb2_send_async_interim_response out: returning %u vectors\n",
- (unsigned int)nreq->out.vector_count );
- print_req_vectors(nreq);
- }
nreq->subreq = tstream_writev_queue_send(nreq,
nreq->sconn->ev_ctx,
nreq->sconn->smb2.stream,
req->subreq = NULL;
TALLOC_FREE(req->async_te);
- if (DEBUGLEVEL >= 10) {
- dbgtext("%s: smbd_smb2_request_reply[%p/%d]: "
- "enc[%u] tf[%u] fk[%u] s[%p] ek[%u]\n",
- __location__, req, req->current_idx,
- req->do_encryption,
- (unsigned)firsttf->iov_len,
- (unsigned)req->first_key.length,
- req->session,
- (unsigned)(req->session?req->session->global->encryption_key.length:0));
- print_req_vectors(req);
- }
-
if (req->do_encryption &&
(firsttf->iov_len == 0) &&
(req->first_key.length == 0) &&
firsttf->iov_len = SMB2_TF_HDR_SIZE;
}
- if (DEBUGLEVEL >= 10) {
- dbgtext("%s: smbd_smb2_request_reply[%p/%d]: sending...\n",
- __location__, req, req->current_idx);
- print_req_vectors(req);
- }
if ((req->current_idx > SMBD_SMB2_NUM_IOV_PER_REQ) &&
(req->last_key.length > 0) &&
(firsttf->iov_len == 0))
*/
if (firsttf->iov_len == SMB2_TF_HDR_SIZE) {
NTSTATUS status;
- if (DEBUGLEVEL >= 10) {
- dbgtext("smbd_smb2_request_reply: sending...\n");
- print_req_vectors(req);
- }
status = smb2_signing_encrypt_pdu(req->first_key,
conn->protocol,