CVE-2015-5370: s3:librpc/rpc: remove unused dcerpc_pull_dcerpc_auth()
authorStefan Metzmacher <metze@samba.org>
Sat, 11 Jul 2015 08:58:07 +0000 (10:58 +0200)
committerStefan Metzmacher <metze@samba.org>
Wed, 30 Mar 2016 02:39:49 +0000 (04:39 +0200)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11344

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
source3/librpc/rpc/dcerpc.h
source3/librpc/rpc/dcerpc_helpers.c

index 0a82e7eea8fe110e611c3c65e8580f1a76520b99..b7537c2b5b516b94b09a2942f845473de0337222 100644 (file)
@@ -69,10 +69,6 @@ NTSTATUS dcerpc_push_dcerpc_auth(TALLOC_CTX *mem_ctx,
                                 uint32_t auth_context_id,
                                 const DATA_BLOB *credentials,
                                 DATA_BLOB *blob);
-NTSTATUS dcerpc_pull_dcerpc_auth(TALLOC_CTX *mem_ctx,
-                                const DATA_BLOB *blob,
-                                struct dcerpc_auth *r,
-                                bool bigendian);
 NTSTATUS dcerpc_guess_sizes(struct pipe_auth_data *auth,
                            size_t header_len, size_t data_left,
                            size_t max_xmit_frag,
index 054647c3f58ddd19e682ce21ccb0f1abed2b779c..48410bb668a4f77831fd33139bb8bdc0fb959f28 100644 (file)
@@ -176,47 +176,6 @@ NTSTATUS dcerpc_push_dcerpc_auth(TALLOC_CTX *mem_ctx,
        return NT_STATUS_OK;
 }
 
-/**
-* @brief Decodes a dcerpc_auth blob
-*
-* @param mem_ctx       The memory context on which to allocate the packet
-*                      elements
-* @param blob          The blob of data to decode
-* @param r             An empty dcerpc_auth structure, must not be NULL
-*
-* @return a NTSTATUS error code
-*/
-NTSTATUS dcerpc_pull_dcerpc_auth(TALLOC_CTX *mem_ctx,
-                                const DATA_BLOB *blob,
-                                struct dcerpc_auth *r,
-                                bool bigendian)
-{
-       enum ndr_err_code ndr_err;
-       struct ndr_pull *ndr;
-
-       ndr = ndr_pull_init_blob(blob, mem_ctx);
-       if (!ndr) {
-               return NT_STATUS_NO_MEMORY;
-       }
-       if (bigendian) {
-               ndr->flags |= LIBNDR_FLAG_BIGENDIAN;
-       }
-
-       ndr_err = ndr_pull_dcerpc_auth(ndr, NDR_SCALARS|NDR_BUFFERS, r);
-
-       if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
-               talloc_free(ndr);
-               return ndr_map_error2ntstatus(ndr_err);
-       }
-       talloc_free(ndr);
-
-       if (DEBUGLEVEL >= 10) {
-               NDR_PRINT_DEBUG(dcerpc_auth, r);
-       }
-
-       return NT_STATUS_OK;
-}
-
 /**
 * @brief Calculate how much data we can in a packet, including calculating
 *       auth token and pad lengths.