Skip to content

Commit

Permalink
s4:librpc/rpc: don't ask for auth_length if we ask for auth data only
Browse files Browse the repository at this point in the history
dcerpc_pull_auth_trailer() handles auth_length=NULL just fine.

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

Signed-off-by: Stefan Metzmacher <[email protected]>
Reviewed-by: Ralph Boehme <[email protected]>
  • Loading branch information
metze-samba committed Jun 24, 2016
1 parent 505a4e6 commit e05c732
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions source4/librpc/rpc/dcerpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1415,12 +1415,10 @@ static void dcerpc_bind_recv_handler(struct rpc_request *subreq,

/* the bind_ack might contain a reply set of credentials */
if (pkt->auth_length != 0 && sec->tmp_auth_info.in != NULL) {
uint32_t auth_length;

status = dcerpc_pull_auth_trailer(pkt, sec->tmp_auth_info.mem,
&pkt->u.bind_ack.auth_info,
sec->tmp_auth_info.in,
&auth_length, true);
NULL, true);
if (tevent_req_nterror(req, status)) {
return;
}
Expand Down Expand Up @@ -2435,12 +2433,10 @@ static void dcerpc_alter_context_recv_handler(struct rpc_request *subreq,

/* the alter_resp might contain a reply set of credentials */
if (pkt->auth_length != 0 && sec->tmp_auth_info.in != NULL) {
uint32_t auth_length;

status = dcerpc_pull_auth_trailer(pkt, sec->tmp_auth_info.mem,
&pkt->u.alter_resp.auth_info,
sec->tmp_auth_info.in,
&auth_length, true);
NULL, true);
if (tevent_req_nterror(req, status)) {
return;
}
Expand Down

0 comments on commit e05c732

Please sign in to comment.