The Samba-Bugzilla – Attachment 8496 Details for
Bug 9585
Samba 3.6.x not correctly signing any but the last response in a compound request/response
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
A better fix ...
smb2_server_signing.patch (text/plain), 1.56 KB, created by
Richard Sharpe
on 2013-01-27 12:36:44 UTC
(
hide
)
Description:
A better fix ...
Filename:
MIME Type:
Creator:
Richard Sharpe
Created:
2013-01-27 12:36:44 UTC
Size:
1.56 KB
patch
obsolete
>diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c >index a0e390e..d9f78ea 100644 >--- a/source3/smbd/smb2_server.c >+++ b/source3/smbd/smb2_server.c >@@ -573,6 +573,25 @@ static void smb2_set_operation_credit(struct smbd_server_connection *sconn, > (unsigned int)sconn->smb2.seqnum_range)); > } > >+/* >+ * Sign each of the responses. >+ */ >+static NTSTATUS smb2_sign_response(struct smbd_smb2_request *req) >+{ >+ NTSTATUS status = NT_STATUS_OK; >+ int idx = 0; >+ int count = req->out.vector_count; >+ >+ for (idx=1; idx < count; idx += 3) { >+ status = smb2_signing_sign_pdu(req->session->session_key, >+ &req->out.vector[idx], 3); >+ if (!NT_STATUS_IS_OK(status)) { >+ return status; >+ } >+ } >+ return status; >+} >+ > static void smb2_calculate_credits(const struct smbd_smb2_request *inreq, > struct smbd_smb2_request *outreq) > { >@@ -858,8 +877,7 @@ static NTSTATUS smb2_send_async_interim_response(const struct smbd_smb2_request > /* Re-sign if needed. */ > if (nreq->do_signing) { > NTSTATUS status; >- status = smb2_signing_sign_pdu(nreq->session->session_key, >- &nreq->out.vector[i], 3); >+ status = smb2_sign_response(nreq); > if (!NT_STATUS_IS_OK(status)) { > return status; > } >@@ -1821,9 +1839,8 @@ static NTSTATUS smbd_smb2_request_reply(struct smbd_smb2_request *req) > smb2_calculate_credits(req, req); > > if (req->do_signing) { >- NTSTATUS status; >- status = smb2_signing_sign_pdu(req->session->session_key, >- &req->out.vector[i], 3); >+ NTSTATUS status = smb2_sign_response(req); >+ > if (!NT_STATUS_IS_OK(status)) { > return status; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 9585
:
8470
|
8474
|
8495
|
8496
|
8507
|
8510