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/user.c | 73 ++++++++++++++++------------------------------- 1 file changed, 25 insertions(+), 48 deletions(-) (limited to 'source3/lib/netapi/user.c') diff --git a/source3/lib/netapi/user.c b/source3/lib/netapi/user.c index c02dfb9dc9..7b530f4308 100644 --- a/source3/lib/netapi/user.c +++ b/source3/lib/netapi/user.c @@ -214,12 +214,9 @@ WERROR NetUserAdd_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; @@ -385,13 +382,11 @@ WERROR NetUserDel_r(struct libnetapi_ctx *ctx, ZERO_STRUCT(domain_handle); ZERO_STRUCT(user_handle); - 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; } @@ -751,12 +746,9 @@ WERROR NetUserEnum_r(struct libnetapi_ctx *ctx, return WERR_NOT_SUPPORTED; } - 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; @@ -1044,12 +1036,9 @@ WERROR NetQueryDisplayInformation_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; @@ -1172,12 +1161,9 @@ WERROR NetUserGetInfo_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; @@ -1295,12 +1281,9 @@ WERROR NetUserSetInfo_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; @@ -1726,12 +1709,9 @@ WERROR NetUserModalsGet_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; @@ -2213,12 +2193,9 @@ WERROR NetUserModalsSet_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; -- cgit