s3-initshutdown: prefer dcerpc_initshutdown_X functions.
[ira/wip.git] / source3 / lib / netapi / shutdown.c
index 78b797b1445ea333fb8adf4beffe892c8ac64a3c..199325b17011f621c8091d948ff5023ba7be24a2 100644 (file)
@@ -23,7 +23,7 @@
 #include "lib/netapi/netapi.h"
 #include "lib/netapi/netapi_private.h"
 #include "lib/netapi/libnetapi.h"
-#include "../librpc/gen_ndr/cli_initshutdown.h"
+#include "../librpc/gen_ndr/ndr_initshutdown_c.h"
 #include "rpc_client/init_lsa.h"
 
 /****************************************************************
@@ -36,6 +36,7 @@ WERROR NetShutdownInit_r(struct libnetapi_ctx *ctx,
        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,
@@ -44,9 +45,11 @@ WERROR NetShutdownInit_r(struct libnetapi_ctx *ctx,
                goto done;
        }
 
+       b = pipe_cli->binding_handle;
+
        init_lsa_StringLarge(&message, r->in.message);
 
-       status = rpccli_initshutdown_Init(pipe_cli, talloc_tos(),
+       status = dcerpc_initshutdown_Init(b, talloc_tos(),
                                          NULL,
                                          &message,
                                          r->in.timeout,
@@ -80,6 +83,7 @@ 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,
@@ -88,7 +92,9 @@ WERROR NetShutdownAbort_r(struct libnetapi_ctx *ctx,
                goto done;
        }
 
-       status = rpccli_initshutdown_Abort(pipe_cli, talloc_tos(),
+       b = pipe_cli->binding_handle;
+
+       status = dcerpc_initshutdown_Abort(b, talloc_tos(),
                                           NULL,
                                           &werr);
        if (!NT_STATUS_IS_OK(status)) {