summaryrefslogtreecommitdiff
path: root/source3/lib/netapi/shutdown.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/netapi/shutdown.c')
-rw-r--r--source3/lib/netapi/shutdown.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/source3/lib/netapi/shutdown.c b/source3/lib/netapi/shutdown.c
index 199325b170..78bc2fce6b 100644
--- a/source3/lib/netapi/shutdown.c
+++ b/source3/lib/netapi/shutdown.c
@@ -34,19 +34,16 @@ WERROR NetShutdownInit_r(struct libnetapi_ctx *ctx,
{
WERROR werr;
NTSTATUS status;
- struct rpc_pipe_client *pipe_cli = NULL;
struct lsa_StringLarge message;
struct dcerpc_binding_handle *b;
- werr = libnetapi_open_pipe(ctx, r->in.server_name,
- &ndr_table_initshutdown.syntax_id,
- &pipe_cli);
+ werr = libnetapi_get_binding_handle(ctx, r->in.server_name,
+ &ndr_table_initshutdown.syntax_id,
+ &b);
if (!W_ERROR_IS_OK(werr)) {
goto done;
}
- b = pipe_cli->binding_handle;
-
init_lsa_StringLarge(&message, r->in.message);
status = dcerpc_initshutdown_Init(b, talloc_tos(),
@@ -82,18 +79,15 @@ WERROR NetShutdownAbort_r(struct libnetapi_ctx *ctx,
{
WERROR werr;
NTSTATUS status;
- struct rpc_pipe_client *pipe_cli = NULL;
struct dcerpc_binding_handle *b;
- werr = libnetapi_open_pipe(ctx, r->in.server_name,
- &ndr_table_initshutdown.syntax_id,
- &pipe_cli);
+ werr = libnetapi_get_binding_handle(ctx, r->in.server_name,
+ &ndr_table_initshutdown.syntax_id,
+ &b);
if (!W_ERROR_IS_OK(werr)) {
goto done;
}
- b = pipe_cli->binding_handle;
-
status = dcerpc_initshutdown_Abort(b, talloc_tos(),
NULL,
&werr);