1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

r3529: fixed signing support for SMBntcancel requests (no reply means seq

number rises by 1, not 2)
This commit is contained in:
Andrew Tridgell 2004-11-04 11:38:44 +00:00 committed by Gerald (Jerry) Carter
parent 3423e2f414
commit 201ff734d4
2 changed files with 11 additions and 2 deletions

View File

@ -2320,6 +2320,7 @@ void reply_ntcreate_and_X(struct smbsrv_request *req)
void reply_ntcancel(struct smbsrv_request *req)
{
/* NOTE: this request does not generate a reply */
req_signing_no_reply(req);
ntvfs_cancel(req);
req_destroy(req);
}

View File

@ -130,13 +130,21 @@ static void req_signing_alloc_seq_num(struct smbsrv_request *req)
{
req->seq_num = req->smb_conn->signing.next_seq_num;
/* TODO: we need to handle one-way requests like NTcancel, which
only increment the sequence number by 1 */
if (req->smb_conn->signing.signing_state != SMB_SIGNING_OFF) {
req->smb_conn->signing.next_seq_num += 2;
}
}
/*
called for requests that do not produce a reply of their own
*/
void req_signing_no_reply(struct smbsrv_request *req)
{
if (req->smb_conn->signing.signing_state != SMB_SIGNING_OFF) {
req->smb_conn->signing.next_seq_num--;
}
}
/***********************************************************
SMB signing - Simple implementation - check a MAC sent by client
************************************************************/