summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2011-04-06 14:21:30 +0200
committerGünther Deschner <gd@samba.org>2011-04-12 12:20:43 +0200
commit0eece6202c94fdd180f266049e1a3712b9477dc6 (patch)
treeb5924e868ea49fbbea8452ec657574f25dade210 /source3/lib
parentf10274806196cbea8d27cc2b1f1fe5087a2ede2b (diff)
downloadsamba-0eece6202c94fdd180f266049e1a3712b9477dc6.tar.gz
samba-0eece6202c94fdd180f266049e1a3712b9477dc6.tar.bz2
samba-0eece6202c94fdd180f266049e1a3712b9477dc6.zip
s3-netapi: add libnetapi_get_binding_handle().
Guenther
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/netapi/cm.c23
-rw-r--r--source3/lib/netapi/netapi_private.h4
2 files changed, 27 insertions, 0 deletions
diff --git a/source3/lib/netapi/cm.c b/source3/lib/netapi/cm.c
index 0b8220675d..290194ba2d 100644
--- a/source3/lib/netapi/cm.c
+++ b/source3/lib/netapi/cm.c
@@ -253,3 +253,26 @@ WERROR libnetapi_open_pipe(struct libnetapi_ctx *ctx,
return WERR_OK;
}
+
+/********************************************************************
+********************************************************************/
+
+WERROR libnetapi_get_binding_handle(struct libnetapi_ctx *ctx,
+ const char *server_name,
+ const struct ndr_syntax_id *interface,
+ struct dcerpc_binding_handle **binding_handle)
+{
+ struct rpc_pipe_client *pipe_cli;
+ WERROR result;
+
+ *binding_handle = NULL;
+
+ result = libnetapi_open_pipe(ctx, server_name, interface, &pipe_cli);
+ if (!W_ERROR_IS_OK(result)) {
+ return result;
+ }
+
+ *binding_handle = pipe_cli->binding_handle;
+
+ return WERR_OK;
+}
diff --git a/source3/lib/netapi/netapi_private.h b/source3/lib/netapi/netapi_private.h
index fe8d72ec0f..7559c61564 100644
--- a/source3/lib/netapi/netapi_private.h
+++ b/source3/lib/netapi/netapi_private.h
@@ -60,6 +60,10 @@ WERROR libnetapi_open_pipe(struct libnetapi_ctx *ctx,
const char *server_name,
const struct ndr_syntax_id *interface,
struct rpc_pipe_client **presult);
+WERROR libnetapi_get_binding_handle(struct libnetapi_ctx *ctx,
+ const char *server_name,
+ const struct ndr_syntax_id *interface,
+ struct dcerpc_binding_handle **binding_handle);
WERROR libnetapi_samr_open_domain(struct libnetapi_ctx *mem_ctx,
struct rpc_pipe_client *pipe_cli,
uint32_t connect_mask,