diff options
author | Stefan Metzmacher <metze@samba.org> | 2015-06-20 17:49:02 +0200 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2015-07-11 21:59:25 +0200 |
commit | e661c302bf7d5bfaaac50bfa5d52f10ee9ec85d7 (patch) | |
tree | bd41cdc2bab1e0f8f13318d4f4c69fb14556c644 | |
parent | 3336fb7a3fc6ca6b1524654aaac0207410bf632e (diff) | |
download | samba-e661c302bf7d5bfaaac50bfa5d52f10ee9ec85d7.tar.gz |
s4:librpc/rpc: fix padding caclucation in ncacn_push_request_sign()
This is simplified by using DCERPC_AUTH_PAD_LENGTH() and changes the behaviour
so that we will use no padding if the stub_length is already aligned
to DCERPC_AUTH_PAD_ALIGNMENT (16 bytes).
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11061
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit 114c52e73ed9e0adeac8ad1bc1dc014f3c10f4d6)
-rw-r--r-- | source4/librpc/rpc/dcerpc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/librpc/rpc/dcerpc.c b/source4/librpc/rpc/dcerpc.c index 9984ea2ca49..562d52e8d1b 100644 --- a/source4/librpc/rpc/dcerpc.c +++ b/source4/librpc/rpc/dcerpc.c @@ -854,7 +854,7 @@ static NTSTATUS ncacn_push_request_sign(struct dcecli_connection *c, whole packet, whereas w2k8 wants it relative to the start of the stub */ c->security_state.auth_info->auth_pad_length = - (16 - (pkt->u.request.stub_and_verifier.length & 15)) & 15; + DCERPC_AUTH_PAD_LENGTH(pkt->u.request.stub_and_verifier.length); ndr_err = ndr_push_zero(ndr, c->security_state.auth_info->auth_pad_length); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { return ndr_map_error2ntstatus(ndr_err); |