s4:librpc/rpc: don't ask for auth_length if we ask for auth data only
authorStefan Metzmacher <metze@samba.org>
Mon, 20 Jun 2016 14:16:23 +0000 (16:16 +0200)
committerStefan Metzmacher <metze@samba.org>
Fri, 24 Jun 2016 12:09:02 +0000 (14:09 +0200)
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 <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source4/librpc/rpc/dcerpc.c

index 55b4385e42f41e6750635895dcd3983bac9454d5..479abc005966b85b62a04b9bf680a3cda32c4309 100644 (file)
@@ -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;
                }
@@ -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;
                }