summaryrefslogtreecommitdiff
path: root/source4/rpc_server
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-09-12 06:04:03 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:58:40 -0500
commit350c12e5c98e13426710c16a2787dd1580e0a060 (patch)
tree8865fdaec4d737b7ca69210082939633a3df8eea /source4/rpc_server
parent15a96c42985c9bb4778a16160290220a935d99bd (diff)
downloadsamba-350c12e5c98e13426710c16a2787dd1580e0a060.tar.gz
samba-350c12e5c98e13426710c16a2787dd1580e0a060.tar.bz2
samba-350c12e5c98e13426710c16a2787dd1580e0a060.zip
r2293: fixed older NTLM sign/seal in the server
(This used to be commit d8825b69aca5f4d0edf70945d64b4d1780e121c4)
Diffstat (limited to 'source4/rpc_server')
-rw-r--r--source4/rpc_server/dcesrv_auth.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/rpc_server/dcesrv_auth.c b/source4/rpc_server/dcesrv_auth.c
index ace5da992d..20ed496d32 100644
--- a/source4/rpc_server/dcesrv_auth.c
+++ b/source4/rpc_server/dcesrv_auth.c
@@ -281,6 +281,7 @@ BOOL dcesrv_auth_response(struct dcesrv_call_state *call,
struct dcesrv_connection *dce_conn = call->conn;
NTSTATUS status;
struct ndr_push *ndr;
+ uint32_t payload_length;
/* non-signed packets are simple */
if (!dce_conn->auth_state.auth_info || !dce_conn->auth_state.gensec_security) {
@@ -306,6 +307,7 @@ BOOL dcesrv_auth_response(struct dcesrv_call_state *call,
dce_conn->auth_state.auth_info->auth_pad_length = NDR_ALIGN(ndr, 8);
ndr_push_zero(ndr, dce_conn->auth_state.auth_info->auth_pad_length);
+ payload_length = ndr->offset - DCERPC_REQUEST_LENGTH;
dce_conn->auth_state.auth_info->credentials
= data_blob_talloc(call->mem_ctx, NULL,
@@ -332,7 +334,7 @@ BOOL dcesrv_auth_response(struct dcesrv_call_state *call,
status = gensec_seal_packet(dce_conn->auth_state.gensec_security,
call->mem_ctx,
ndr->data + DCERPC_REQUEST_LENGTH,
- ndr->offset - DCERPC_REQUEST_LENGTH,
+ payload_length,
blob->data,
blob->length - dce_conn->auth_state.auth_info->credentials.length,
&dce_conn->auth_state.auth_info->credentials);
@@ -342,7 +344,7 @@ BOOL dcesrv_auth_response(struct dcesrv_call_state *call,
status = gensec_sign_packet(dce_conn->auth_state.gensec_security,
call->mem_ctx,
ndr->data + DCERPC_REQUEST_LENGTH,
- ndr->offset - DCERPC_REQUEST_LENGTH,
+ payload_length,
blob->data,
blob->length - dce_conn->auth_state.auth_info->credentials.length,
&dce_conn->auth_state.auth_info->credentials);