From fcd10d26a407bef323cb8beda39a21aeb1e5b144 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 12 Aug 2008 17:59:23 +0200 Subject: netapi: make libnetapi_open_ipc_connection static. Guenther (cherry picked from commit 0259914f8ff04514a8395d8e1af61aadd50c5efb) (This used to be commit 7edc671cc1007ae216e7efdbcdb9cfa1e547dca5) --- source3/lib/netapi/group.c | 63 ++++++++++++++++------------------------------ 1 file changed, 21 insertions(+), 42 deletions(-) (limited to 'source3/lib/netapi/group.c') diff --git a/source3/lib/netapi/group.c b/source3/lib/netapi/group.c index e057e6de02..f7c9366820 100644 --- a/source3/lib/netapi/group.c +++ b/source3/lib/netapi/group.c @@ -71,12 +71,9 @@ WERROR NetGroupAdd_r(struct libnetapi_ctx *ctx, goto done; } - werr = libnetapi_open_ipc_connection(ctx, r->in.server_name, &cli); - if (!W_ERROR_IS_OK(werr)) { - goto done; - } - - werr = libnetapi_open_pipe(ctx, cli, &ndr_table_samr.syntax_id, + werr = libnetapi_open_pipe(ctx, r->in.server_name, + &ndr_table_samr.syntax_id, + &cli, &pipe_cli); if (!W_ERROR_IS_OK(werr)) { goto done; @@ -251,12 +248,9 @@ WERROR NetGroupDel_r(struct libnetapi_ctx *ctx, return WERR_INVALID_PARAM; } - werr = libnetapi_open_ipc_connection(ctx, r->in.server_name, &cli); - if (!W_ERROR_IS_OK(werr)) { - goto done; - } - - werr = libnetapi_open_pipe(ctx, cli, &ndr_table_samr.syntax_id, + werr = libnetapi_open_pipe(ctx, r->in.server_name, + &ndr_table_samr.syntax_id, + &cli, &pipe_cli); if (!W_ERROR_IS_OK(werr)) { goto done; @@ -425,12 +419,9 @@ WERROR NetGroupSetInfo_r(struct libnetapi_ctx *ctx, return WERR_INVALID_PARAM; } - werr = libnetapi_open_ipc_connection(ctx, r->in.server_name, &cli); - if (!W_ERROR_IS_OK(werr)) { - goto done; - } - - werr = libnetapi_open_pipe(ctx, cli, &ndr_table_samr.syntax_id, + werr = libnetapi_open_pipe(ctx, r->in.server_name, + &ndr_table_samr.syntax_id, + &cli, &pipe_cli); if (!W_ERROR_IS_OK(werr)) { goto done; @@ -669,12 +660,9 @@ WERROR NetGroupGetInfo_r(struct libnetapi_ctx *ctx, return WERR_INVALID_PARAM; } - werr = libnetapi_open_ipc_connection(ctx, r->in.server_name, &cli); - if (!W_ERROR_IS_OK(werr)) { - goto done; - } - - werr = libnetapi_open_pipe(ctx, cli, &ndr_table_samr.syntax_id, + werr = libnetapi_open_pipe(ctx, r->in.server_name, + &ndr_table_samr.syntax_id, + &cli, &pipe_cli); if (!W_ERROR_IS_OK(werr)) { goto done; @@ -794,12 +782,9 @@ WERROR NetGroupAddUser_r(struct libnetapi_ctx *ctx, return WERR_INVALID_PARAM; } - werr = libnetapi_open_ipc_connection(ctx, r->in.server_name, &cli); - if (!W_ERROR_IS_OK(werr)) { - goto done; - } - - werr = libnetapi_open_pipe(ctx, cli, &ndr_table_samr.syntax_id, + werr = libnetapi_open_pipe(ctx, r->in.server_name, + &ndr_table_samr.syntax_id, + &cli, &pipe_cli); if (!W_ERROR_IS_OK(werr)) { goto done; @@ -924,12 +909,9 @@ WERROR NetGroupDelUser_r(struct libnetapi_ctx *ctx, return WERR_INVALID_PARAM; } - werr = libnetapi_open_ipc_connection(ctx, r->in.server_name, &cli); - if (!W_ERROR_IS_OK(werr)) { - goto done; - } - - werr = libnetapi_open_pipe(ctx, cli, &ndr_table_samr.syntax_id, + werr = libnetapi_open_pipe(ctx, r->in.server_name, + &ndr_table_samr.syntax_id, + &cli, &pipe_cli); if (!W_ERROR_IS_OK(werr)) { goto done; @@ -1211,12 +1193,9 @@ WERROR NetGroupEnum_r(struct libnetapi_ctx *ctx, return WERR_UNKNOWN_LEVEL; } - werr = libnetapi_open_ipc_connection(ctx, r->in.server_name, &cli); - if (!W_ERROR_IS_OK(werr)) { - goto done; - } - - werr = libnetapi_open_pipe(ctx, cli, &ndr_table_samr.syntax_id, + werr = libnetapi_open_pipe(ctx, r->in.server_name, + &ndr_table_samr.syntax_id, + &cli, &pipe_cli); if (!W_ERROR_IS_OK(werr)) { goto done; -- cgit