From ef6ed54765b1d8ccaabfb3268f8427cc791b738b Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 10 Apr 2008 22:44:00 +0200 Subject: Use libnetapi_open_pipe in netapi functions. Guenther (This used to be commit 5804d8b112e1da022988c635284eb4799974d4c7) --- source3/lib/netapi/user.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'source3/lib/netapi/user.c') diff --git a/source3/lib/netapi/user.c b/source3/lib/netapi/user.c index d9505bc067..31e5faa594 100644 --- a/source3/lib/netapi/user.c +++ b/source3/lib/netapi/user.c @@ -185,9 +185,8 @@ WERROR NetUserAdd_r(struct libnetapi_ctx *ctx, goto done; } - pipe_cli = cli_rpc_pipe_open_noauth(cli, PI_SAMR, &status); - if (!pipe_cli) { - werr = ntstatus_to_werror(status); + werr = libnetapi_open_pipe(ctx, cli, PI_SAMR, &pipe_cli); + if (!W_ERROR_IS_OK(werr)) { goto done; } @@ -378,9 +377,8 @@ WERROR NetUserDel_r(struct libnetapi_ctx *ctx, goto done; } - pipe_cli = cli_rpc_pipe_open_noauth(cli, PI_SAMR, &status); - if (!pipe_cli) { - werr = ntstatus_to_werror(status); + werr = libnetapi_open_pipe(ctx, cli, PI_SAMR, &pipe_cli); + if (!W_ERROR_IS_OK(werr)) { goto done; } @@ -602,9 +600,8 @@ WERROR NetUserEnum_r(struct libnetapi_ctx *ctx, goto done; } - pipe_cli = cli_rpc_pipe_open_noauth(cli, PI_SAMR, &status); - if (!pipe_cli) { - werr = ntstatus_to_werror(status); + werr = libnetapi_open_pipe(ctx, cli, PI_SAMR, &pipe_cli); + if (!W_ERROR_IS_OK(werr)) { goto done; } -- cgit