summaryrefslogtreecommitdiff
path: root/source3/lib/netapi/serverinfo.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/netapi/serverinfo.c')
-rw-r--r--source3/lib/netapi/serverinfo.c27
1 files changed, 9 insertions, 18 deletions
diff --git a/source3/lib/netapi/serverinfo.c b/source3/lib/netapi/serverinfo.c
index 6de97b9de41..22c7df69d12 100644
--- a/source3/lib/netapi/serverinfo.c
+++ b/source3/lib/netapi/serverinfo.c
@@ -480,7 +480,6 @@ static NTSTATUS map_server_info_to_SERVER_INFO_buffer(TALLOC_CTX *mem_ctx,
WERROR NetServerGetInfo_r(struct libnetapi_ctx *ctx,
struct NetServerGetInfo *r)
{
- struct rpc_pipe_client *pipe_cli = NULL;
NTSTATUS status;
WERROR werr;
union srvsvc_NetSrvInfo info;
@@ -503,15 +502,13 @@ WERROR NetServerGetInfo_r(struct libnetapi_ctx *ctx,
return WERR_UNKNOWN_LEVEL;
}
- werr = libnetapi_open_pipe(ctx, r->in.server_name,
- &ndr_table_srvsvc.syntax_id,
- &pipe_cli);
+ werr = libnetapi_get_binding_handle(ctx, r->in.server_name,
+ &ndr_table_srvsvc.syntax_id,
+ &b);
if (!W_ERROR_IS_OK(werr)) {
goto done;
}
- b = pipe_cli->binding_handle;
-
status = dcerpc_srvsvc_NetSrvGetInfo(b, talloc_tos(),
r->in.server_name,
r->in.level,
@@ -601,21 +598,18 @@ WERROR NetServerSetInfo_l(struct libnetapi_ctx *ctx,
WERROR NetServerSetInfo_r(struct libnetapi_ctx *ctx,
struct NetServerSetInfo *r)
{
- struct rpc_pipe_client *pipe_cli = NULL;
NTSTATUS status;
WERROR werr;
union srvsvc_NetSrvInfo info;
struct dcerpc_binding_handle *b;
- werr = libnetapi_open_pipe(ctx, r->in.server_name,
- &ndr_table_srvsvc.syntax_id,
- &pipe_cli);
+ werr = libnetapi_get_binding_handle(ctx, r->in.server_name,
+ &ndr_table_srvsvc.syntax_id,
+ &b);
if (!W_ERROR_IS_OK(werr)) {
goto done;
}
- b = pipe_cli->binding_handle;
-
switch (r->in.level) {
case 1005:
info.info1005 = (struct srvsvc_NetSrvInfo1005 *)r->in.buffer;
@@ -646,21 +640,18 @@ WERROR NetServerSetInfo_r(struct libnetapi_ctx *ctx,
WERROR NetRemoteTOD_r(struct libnetapi_ctx *ctx,
struct NetRemoteTOD *r)
{
- struct rpc_pipe_client *pipe_cli = NULL;
NTSTATUS status;
WERROR werr;
struct srvsvc_NetRemoteTODInfo *info = NULL;
struct dcerpc_binding_handle *b;
- werr = libnetapi_open_pipe(ctx, r->in.server_name,
- &ndr_table_srvsvc.syntax_id,
- &pipe_cli);
+ werr = libnetapi_get_binding_handle(ctx, r->in.server_name,
+ &ndr_table_srvsvc.syntax_id,
+ &b);
if (!W_ERROR_IS_OK(werr)) {
goto done;
}
- b = pipe_cli->binding_handle;
-
status = dcerpc_srvsvc_NetRemoteTOD(b, talloc_tos(),
r->in.server_name,
&info,