summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorSamuel Cabrero <scabrero@samba.org>2019-10-03 16:44:36 +0200
committerAndreas Schneider <asn@cryptomilk.org>2019-10-18 16:07:36 +0000
commitae9956a65e6913a73dfa68e2b5deebfeaf52c0e5 (patch)
tree6c67482e036b867d7bd71e075a327ff4fc411ad3 /source4
parentb6c8afa98c5c1f9853b09fd83b039aacc79700db (diff)
downloadsamba-ae9956a65e6913a73dfa68e2b5deebfeaf52c0e5.tar.gz
librpc: Move dcerpc_ncacn_push_auth from s4 librpc to common librpc
Signed-off-by: Samuel Cabrero <scabrero@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source4')
-rw-r--r--source4/librpc/rpc/dcerpc_util.c56
1 files changed, 0 insertions, 56 deletions
diff --git a/source4/librpc/rpc/dcerpc_util.c b/source4/librpc/rpc/dcerpc_util.c
index f2db5875af3..b856ebe5620 100644
--- a/source4/librpc/rpc/dcerpc_util.c
+++ b/source4/librpc/rpc/dcerpc_util.c
@@ -49,62 +49,6 @@ const struct ndr_interface_call *dcerpc_iface_find_call(const struct ndr_interfa
return NULL;
}
-/*
- push a ncacn_packet into a blob, potentially with auth info
-*/
-NTSTATUS dcerpc_ncacn_push_auth(DATA_BLOB *blob,
- TALLOC_CTX *mem_ctx,
- struct ncacn_packet *pkt,
- struct dcerpc_auth *auth_info)
-{
- struct ndr_push *ndr;
- enum ndr_err_code ndr_err;
-
- ndr = ndr_push_init_ctx(mem_ctx);
- if (!ndr) {
- return NT_STATUS_NO_MEMORY;
- }
-
- if (auth_info) {
- pkt->auth_length = auth_info->credentials.length;
- } else {
- pkt->auth_length = 0;
- }
-
- ndr_err = ndr_push_ncacn_packet(ndr, NDR_SCALARS|NDR_BUFFERS, pkt);
- if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
- return ndr_map_error2ntstatus(ndr_err);
- }
-
- if (auth_info) {
-#if 0
- /* the s3 rpc server doesn't handle auth padding in
- bind requests. Use zero auth padding to keep us
- working with old servers */
- uint32_t offset = ndr->offset;
- ndr_err = ndr_push_align(ndr, 16);
- if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
- return ndr_map_error2ntstatus(ndr_err);
- }
- auth_info->auth_pad_length = ndr->offset - offset;
-#else
- auth_info->auth_pad_length = 0;
-#endif
- ndr_err = ndr_push_dcerpc_auth(ndr, NDR_SCALARS|NDR_BUFFERS, auth_info);
- if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
- return ndr_map_error2ntstatus(ndr_err);
- }
- }
-
- *blob = ndr_push_blob(ndr);
-
- /* fill in the frag length */
- dcerpc_set_frag_length(blob, blob->length);
-
- return NT_STATUS_OK;
-}
-
-
struct epm_map_binding_state {
struct dcerpc_binding *binding;
const struct ndr_interface_table *table;