summaryrefslogtreecommitdiff
path: root/source4/rpc_server
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-02-14 17:09:55 +1100
committerAndrew Tridgell <tridge@samba.org>2010-02-14 18:44:21 +1100
commiteb5fc899b0a17d86eef4f40d71b023d8db1708b4 (patch)
tree06cb83c3a27b8b603afccb7e355a7534cb8690fd /source4/rpc_server
parent259129e8f4bc8cacd1850eba3f6551134835d079 (diff)
downloadsamba-eb5fc899b0a17d86eef4f40d71b023d8db1708b4.tar.gz
samba-eb5fc899b0a17d86eef4f40d71b023d8db1708b4.tar.bz2
samba-eb5fc899b0a17d86eef4f40d71b023d8db1708b4.zip
s4-rpcserver: teach the rpc server to cope with bad sig_size estimates
Diffstat (limited to 'source4/rpc_server')
-rw-r--r--source4/rpc_server/dcesrv_auth.c32
1 files changed, 14 insertions, 18 deletions
diff --git a/source4/rpc_server/dcesrv_auth.c b/source4/rpc_server/dcesrv_auth.c
index 4d708e4dff..e74b2ef167 100644
--- a/source4/rpc_server/dcesrv_auth.c
+++ b/source4/rpc_server/dcesrv_auth.c
@@ -482,27 +482,23 @@ bool dcesrv_auth_response(struct dcesrv_call_state *call,
break;
}
- if (NT_STATUS_IS_OK(status)) {
- if (creds2.length != sig_size) {
- DEBUG(0,("dcesrv_auth_response: creds2.length[%u] != sig_size[%u] pad[%u] stub[%u]\n",
- (unsigned)creds2.length, (uint32_t)sig_size,
- (unsigned)dce_conn->auth_state.auth_info->auth_pad_length,
- (unsigned)pkt->u.response.stub_and_verifier.length));
- data_blob_free(&creds2);
- status = NT_STATUS_INTERNAL_ERROR;
- }
- }
-
- if (NT_STATUS_IS_OK(status)) {
- if (!data_blob_append(call, blob, creds2.data, creds2.length)) {
- status = NT_STATUS_NO_MEMORY;
- }
- data_blob_free(&creds2);
- }
-
if (!NT_STATUS_IS_OK(status)) {
return false;
}
+ if (creds2.length != sig_size) {
+ DEBUG(3,("dcesrv_auth_response: creds2.length[%u] != sig_size[%u] pad[%u] stub[%u]\n",
+ (unsigned)creds2.length, (uint32_t)sig_size,
+ (unsigned)dce_conn->auth_state.auth_info->auth_pad_length,
+ (unsigned)pkt->u.response.stub_and_verifier.length));
+ dcerpc_set_frag_length(blob, blob->length + creds2.length);
+ dcerpc_set_auth_length(blob, creds2.length);
+ }
+
+ if (!data_blob_append(call, blob, creds2.data, creds2.length)) {
+ status = NT_STATUS_NO_MEMORY;
+ }
+ data_blob_free(&creds2);
+
return true;
}