summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2011-07-13 13:49:57 +0200
committerAndreas Schneider <asn@samba.org>2011-08-01 08:50:35 +0200
commit4b751b29e50ea87bd3f082d63014cbcbff8bc519 (patch)
tree281992fd521f8d44463a892afef0bdbe71844de3 /source3
parent0fef6766b9e4c8612b2ad547720ec47463917192 (diff)
downloadsamba-4b751b29e50ea87bd3f082d63014cbcbff8bc519.tar.gz
samba-4b751b29e50ea87bd3f082d63014cbcbff8bc519.tar.bz2
samba-4b751b29e50ea87bd3f082d63014cbcbff8bc519.zip
s3-librpc: Remove obsolete dcerpc_binding_vector_create().
Diffstat (limited to 'source3')
-rw-r--r--source3/librpc/rpc/dcerpc_ep.c105
-rw-r--r--source3/librpc/rpc/dcerpc_ep.h6
2 files changed, 0 insertions, 111 deletions
diff --git a/source3/librpc/rpc/dcerpc_ep.c b/source3/librpc/rpc/dcerpc_ep.c
index e734be3b2b..336ff878e1 100644
--- a/source3/librpc/rpc/dcerpc_ep.c
+++ b/source3/librpc/rpc/dcerpc_ep.c
@@ -291,111 +291,6 @@ struct dcerpc_binding_vector *dcerpc_binding_vector_dup(TALLOC_CTX *mem_ctx,
return v;
}
-NTSTATUS dcerpc_binding_vector_create(TALLOC_CTX *mem_ctx,
- const struct ndr_interface_table *iface,
- uint16_t port,
- const char *ncalrpc,
- struct dcerpc_binding_vector **pbvec)
-{
- struct dcerpc_binding_vector *bvec;
- uint32_t ep_count;
- uint32_t count = 0;
- uint32_t i;
- NTSTATUS status;
- TALLOC_CTX *tmp_ctx;
-
- tmp_ctx = talloc_stackframe();
- if (tmp_ctx == NULL) {
- return NT_STATUS_NO_MEMORY;
- }
-
- ep_count = iface->endpoints->count;
-
- bvec = talloc_zero(tmp_ctx, struct dcerpc_binding_vector);
- if (bvec == NULL) {
- status = NT_STATUS_NO_MEMORY;
- goto done;
- }
-
- bvec->bindings = talloc_zero_array(bvec, struct dcerpc_binding, ep_count);
- if (bvec->bindings == NULL) {
- status = NT_STATUS_NO_MEMORY;
- goto done;
- }
-
- for (i = 0; i < ep_count; i++) {
- struct dcerpc_binding *b;
-
- b = talloc_zero(bvec->bindings, struct dcerpc_binding);
- if (b == NULL) {
- status = NT_STATUS_NO_MEMORY;
- goto done;
- }
-
- status = dcerpc_parse_binding(b, iface->endpoints->names[i], &b);
- if (!NT_STATUS_IS_OK(status)) {
- status = NT_STATUS_UNSUCCESSFUL;
- goto done;
- }
-
- b->object = iface->syntax_id;
-
- switch (b->transport) {
- case NCACN_NP:
- b->host = talloc_asprintf(b, "\\\\%s", lp_netbios_name());
- if (b->host == NULL) {
- status = NT_STATUS_NO_MEMORY;
- goto done;
- }
- break;
- case NCACN_IP_TCP:
- if (port == 0) {
- talloc_free(b);
- continue;
- }
-
- b->endpoint = talloc_asprintf(b, "%u", port);
- if (b->endpoint == NULL) {
- status = NT_STATUS_NO_MEMORY;
- goto done;
- }
-
- break;
- case NCALRPC:
- if (ncalrpc == NULL) {
- talloc_free(b);
- continue;
- }
-
- b->endpoint = talloc_asprintf(b,
- "%s/%s",
- lp_ncalrpc_dir(),
- ncalrpc);
- if (b->endpoint == NULL) {
- status = NT_STATUS_NO_MEMORY;
- goto done;
- }
- break;
- default:
- talloc_free(b);
- continue;
- }
-
- bvec->bindings[count] = *b;
- count++;
- }
-
- bvec->count = count;
-
- *pbvec = talloc_move(mem_ctx, &bvec);
-
- status = NT_STATUS_OK;
-done:
- talloc_free(tmp_ctx);
-
- return status;
-}
-
static NTSTATUS ep_register(TALLOC_CTX *mem_ctx,
struct messaging_context *msg_ctx,
const struct ndr_interface_table *iface,
diff --git a/source3/librpc/rpc/dcerpc_ep.h b/source3/librpc/rpc/dcerpc_ep.h
index ba1e688e6c..8bcf184280 100644
--- a/source3/librpc/rpc/dcerpc_ep.h
+++ b/source3/librpc/rpc/dcerpc_ep.h
@@ -107,12 +107,6 @@ struct dcerpc_binding_vector *dcerpc_binding_vector_dup(TALLOC_CTX *mem_ctx,
NTSTATUS dcerpc_binding_vector_replace_iface(const struct ndr_interface_table *iface,
struct dcerpc_binding_vector *v);
-NTSTATUS dcerpc_binding_vector_create(TALLOC_CTX *mem_ctx,
- const struct ndr_interface_table *iface,
- uint16_t port,
- const char *ncalrpc,
- struct dcerpc_binding_vector **pbvec);
-
/**
* @brief Adds server address information in the local endpoint map.
*