summaryrefslogtreecommitdiff
path: root/source4/rpc_server
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-02-14 11:56:28 +1100
committerAndrew Tridgell <tridge@samba.org>2010-02-14 18:44:21 +1100
commit259129e8f4bc8cacd1850eba3f6551134835d079 (patch)
treec260895bc44323820cee72a8eaf6a77433090d5d /source4/rpc_server
parentccfa40fdc3eb785b71a4d2d59933a2fdc352fb24 (diff)
downloadsamba-259129e8f4bc8cacd1850eba3f6551134835d079.tar.gz
samba-259129e8f4bc8cacd1850eba3f6551134835d079.tar.bz2
samba-259129e8f4bc8cacd1850eba3f6551134835d079.zip
a4-dcerpc: another attempt at dcerpc auth padding
The last change broke net vampire against w2k8r2
Diffstat (limited to 'source4/rpc_server')
-rw-r--r--source4/rpc_server/dcesrv_auth.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source4/rpc_server/dcesrv_auth.c b/source4/rpc_server/dcesrv_auth.c
index d56dd12ac5..4d708e4dff 100644
--- a/source4/rpc_server/dcesrv_auth.c
+++ b/source4/rpc_server/dcesrv_auth.c
@@ -378,7 +378,7 @@ bool dcesrv_auth_response(struct dcesrv_call_state *call,
NTSTATUS status;
enum ndr_err_code ndr_err;
struct ndr_push *ndr;
- uint32_t payload_length;
+ uint32_t payload_length, offset;
DATA_BLOB creds2;
/* non-signed packets are simple */
@@ -423,12 +423,12 @@ bool dcesrv_auth_response(struct dcesrv_call_state *call,
}
/* pad to 16 byte multiple, match win2k3 */
- dce_conn->auth_state.auth_info->auth_pad_length =
- (16 - (pkt->u.response.stub_and_verifier.length & 15)) & 15;
- ndr_err = ndr_push_zero(ndr, dce_conn->auth_state.auth_info->auth_pad_length);
+ offset = ndr->offset;
+ ndr_err = ndr_push_align(ndr, 16);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
return false;
}
+ dce_conn->auth_state.auth_info->auth_pad_length = ndr->offset - offset;
payload_length = pkt->u.response.stub_and_verifier.length +
dce_conn->auth_state.auth_info->auth_pad_length;