diff options
author | Günther Deschner <gd@samba.org> | 2008-04-10 22:44:00 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-04-10 22:44:00 +0200 |
commit | ef6ed54765b1d8ccaabfb3268f8427cc791b738b (patch) | |
tree | 91b0c0c65d326ea8eb271e1cfed98db9a0e85652 /source3/lib/netapi/getdc.c | |
parent | 3d5aecd2b940215c2566b2e429c2cc3803ff0ad4 (diff) | |
download | samba-ef6ed54765b1d8ccaabfb3268f8427cc791b738b.tar.gz samba-ef6ed54765b1d8ccaabfb3268f8427cc791b738b.tar.bz2 samba-ef6ed54765b1d8ccaabfb3268f8427cc791b738b.zip |
Use libnetapi_open_pipe in netapi functions.
Guenther
(This used to be commit 5804d8b112e1da022988c635284eb4799974d4c7)
Diffstat (limited to 'source3/lib/netapi/getdc.c')
-rw-r--r-- | source3/lib/netapi/getdc.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/source3/lib/netapi/getdc.c b/source3/lib/netapi/getdc.c index 8f882941b3..38aaf0ef85 100644 --- a/source3/lib/netapi/getdc.c +++ b/source3/lib/netapi/getdc.c @@ -50,10 +50,8 @@ WERROR NetGetDCName_r(struct libnetapi_ctx *ctx, goto done; } - pipe_cli = cli_rpc_pipe_open_noauth(cli, PI_NETLOGON, - &status); - if (!pipe_cli) { - werr = ntstatus_to_werror(status); + werr = libnetapi_open_pipe(ctx, cli, PI_NETLOGON, &pipe_cli); + if (!W_ERROR_IS_OK(werr)) { goto done; } @@ -92,12 +90,10 @@ WERROR NetGetAnyDCName_r(struct libnetapi_ctx *ctx, goto done; } - pipe_cli = cli_rpc_pipe_open_noauth(cli, PI_NETLOGON, - &status); - if (!pipe_cli) { - werr = ntstatus_to_werror(status); + werr = libnetapi_open_pipe(ctx, cli, PI_NETLOGON, &pipe_cli); + if (!W_ERROR_IS_OK(werr)) { goto done; - }; + } status = rpccli_netr_GetAnyDCName(pipe_cli, ctx, r->in.server_name, @@ -152,10 +148,8 @@ WERROR DsGetDcName_r(struct libnetapi_ctx *ctx, goto done; } - pipe_cli = cli_rpc_pipe_open_noauth(cli, PI_NETLOGON, - &status); - if (!pipe_cli) { - werr = ntstatus_to_werror(status); + werr = libnetapi_open_pipe(ctx, cli, PI_NETLOGON, &pipe_cli); + if (!W_ERROR_IS_OK(werr)) { goto done; } |