summaryrefslogtreecommitdiff
path: root/source3/lib/netapi/netlogon.c
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2011-04-06 14:35:24 +0200
committerGünther Deschner <gd@samba.org>2011-04-12 12:20:43 +0200
commit3acd6bde58ecd68faf8200268cc674a71c57778d (patch)
treeacde763cb36c218c256c4f7a4462f6c80b6fdcab /source3/lib/netapi/netlogon.c
parent0eece6202c94fdd180f266049e1a3712b9477dc6 (diff)
downloadsamba-3acd6bde58ecd68faf8200268cc674a71c57778d.tar.gz
samba-3acd6bde58ecd68faf8200268cc674a71c57778d.tar.bz2
samba-3acd6bde58ecd68faf8200268cc674a71c57778d.zip
s3-netapi: use libnetapi_get_binding_handle().
Guenther
Diffstat (limited to 'source3/lib/netapi/netlogon.c')
-rw-r--r--source3/lib/netapi/netlogon.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/source3/lib/netapi/netlogon.c b/source3/lib/netapi/netlogon.c
index 0a15063ba4..a046fb77e9 100644
--- a/source3/lib/netapi/netlogon.c
+++ b/source3/lib/netapi/netlogon.c
@@ -129,19 +129,16 @@ WERROR I_NetLogonControl_r(struct libnetapi_ctx *ctx,
{
WERROR werr;
NTSTATUS status;
- struct rpc_pipe_client *pipe_cli = NULL;
union netr_CONTROL_QUERY_INFORMATION query;
struct dcerpc_binding_handle *b;
- werr = libnetapi_open_pipe(ctx, r->in.server_name,
- &ndr_table_netlogon.syntax_id,
- &pipe_cli);
+ werr = libnetapi_get_binding_handle(ctx, r->in.server_name,
+ &ndr_table_netlogon.syntax_id,
+ &b);
if (!W_ERROR_IS_OK(werr)) {
goto done;
}
- b = pipe_cli->binding_handle;
-
status = dcerpc_netr_LogonControl(b, talloc_tos(),
r->in.server_name,
r->in.function_code,
@@ -183,7 +180,6 @@ WERROR I_NetLogonControl2_r(struct libnetapi_ctx *ctx,
{
WERROR werr;
NTSTATUS status;
- struct rpc_pipe_client *pipe_cli = NULL;
union netr_CONTROL_DATA_INFORMATION data;
union netr_CONTROL_QUERY_INFORMATION query;
struct dcerpc_binding_handle *b;
@@ -193,15 +189,13 @@ WERROR I_NetLogonControl2_r(struct libnetapi_ctx *ctx,
goto done;
}
- werr = libnetapi_open_pipe(ctx, r->in.server_name,
- &ndr_table_netlogon.syntax_id,
- &pipe_cli);
+ werr = libnetapi_get_binding_handle(ctx, r->in.server_name,
+ &ndr_table_netlogon.syntax_id,
+ &b);
if (!W_ERROR_IS_OK(werr)) {
goto done;
}
- b = pipe_cli->binding_handle;
-
switch (r->in.function_code) {
case NETLOGON_CONTROL_TC_VERIFY:
case NETLOGON_CONTROL_SET_DBFLAG: