summaryrefslogtreecommitdiff
path: root/source3/lib/netapi/serverinfo.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/serverinfo.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/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 6de97b9de4..22c7df69d1 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,