diff options
author | Günther Deschner <gd@samba.org> | 2011-04-06 14:21:30 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2011-04-12 12:20:43 +0200 |
commit | 0eece6202c94fdd180f266049e1a3712b9477dc6 (patch) | |
tree | b5924e868ea49fbbea8452ec657574f25dade210 | |
parent | f10274806196cbea8d27cc2b1f1fe5087a2ede2b (diff) | |
download | samba-0eece6202c94fdd180f266049e1a3712b9477dc6.tar.gz samba-0eece6202c94fdd180f266049e1a3712b9477dc6.tar.bz2 samba-0eece6202c94fdd180f266049e1a3712b9477dc6.zip |
s3-netapi: add libnetapi_get_binding_handle().
Guenther
-rw-r--r-- | source3/lib/netapi/cm.c | 23 | ||||
-rw-r--r-- | source3/lib/netapi/netapi_private.h | 4 |
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, |