dcerpc_util: let dcerpc_pull_auth_trailer() ignore data_and_pad for bind, alter,...
authorStefan Metzmacher <metze@samba.org>
Wed, 11 Nov 2020 16:07:54 +0000 (17:07 +0100)
committerStefan Metzmacher <metze@samba.org>
Tue, 23 Apr 2024 16:16:45 +0000 (18:16 +0200)
commit3b3958bf67b884f1cc35cfc4acb6a152ff448499
treed90167128779b1ecb5795531d9462d021aeee969
parent47eac469591d1dd1251488f55d172a39c4e754b1
dcerpc_util: let dcerpc_pull_auth_trailer() ignore data_and_pad for bind, alter, auth3

Sometimes Windows sends 3 presentation contexts (NDR32, NDR64,
BindTimeFeatureNegotiation) in the first BIND of an association.

Binding an additional connection to the association seems to
reuse the BIND buffer and just changes the num_contexts field from
3 to 2 and leaves the BindTimeFeatureNegotiation context as padding
in places.

Note, the auth_pad_length field is send as 0 in that case,
which means we need to ignore it completely, as well as any
padding before the auth header.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14356

Signed-off-by: Stefan Metzmacher <metze@samba.org>
librpc/rpc/dcerpc_util.c