From d8e454664a97385d798ad53633856044f928a491 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 29 May 2007 15:27:13 +0000 Subject: r23210: Very funny, we thought to use netr_GetDcName (e.g. in winbind) but were using netr_GetDcAnyName all the time (which is the correct thing to do). Fix the naming and opcode mixup in all branches. Guenther (This used to be commit def6464c872a5939f0028837254f2c019d2d71c8) --- source3/rpc_client/cli_netlogon.c | 46 +++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'source3/rpc_client/cli_netlogon.c') diff --git a/source3/rpc_client/cli_netlogon.c b/source3/rpc_client/cli_netlogon.c index eaa398087b..f155c736e9 100644 --- a/source3/rpc_client/cli_netlogon.c +++ b/source3/rpc_client/cli_netlogon.c @@ -380,15 +380,15 @@ NTSTATUS rpccli_netlogon_logon_ctrl2(struct rpc_pipe_client *cli, TALLOC_CTX *me return result; } -/* GetDCName */ +/* GetAnyDCName */ -WERROR rpccli_netlogon_getdcname(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx, const char *mydcname, - const char *domainname, fstring newdcname) +WERROR rpccli_netlogon_getanydcname(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, const char *mydcname, + const char *domainname, fstring newdcname) { prs_struct qbuf, rbuf; - NET_Q_GETDCNAME q; - NET_R_GETDCNAME r; + NET_Q_GETANYDCNAME q; + NET_R_GETANYDCNAME r; WERROR result; fstring mydcname_slash; @@ -398,15 +398,15 @@ WERROR rpccli_netlogon_getdcname(struct rpc_pipe_client *cli, /* Initialise input parameters */ slprintf(mydcname_slash, sizeof(fstring)-1, "\\\\%s", mydcname); - init_net_q_getdcname(&q, mydcname_slash, domainname); + init_net_q_getanydcname(&q, mydcname_slash, domainname); /* Marshall data and send request */ - CLI_DO_RPC_WERR(cli, mem_ctx, PI_NETLOGON, NET_GETDCNAME, + CLI_DO_RPC_WERR(cli, mem_ctx, PI_NETLOGON, NET_GETANYDCNAME, q, r, qbuf, rbuf, - net_io_q_getdcname, - net_io_r_getdcname, + net_io_q_getanydcname, + net_io_r_getanydcname, WERR_GENERAL_FAILURE); result = r.status; @@ -418,16 +418,16 @@ WERROR rpccli_netlogon_getdcname(struct rpc_pipe_client *cli, return result; } -/* GetAnyDCName */ +/* GetDCName */ -WERROR rpccli_netlogon_getanydcname(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx, const char *mydcname, - const char *domainname, fstring newdcname) +NTSTATUS rpccli_netlogon_getdcname(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, const char *mydcname, + const char *domainname, fstring newdcname) { prs_struct qbuf, rbuf; - NET_Q_GETANYDCNAME q; - NET_R_GETANYDCNAME r; - WERROR result; + NET_Q_GETDCNAME q; + NET_R_GETDCNAME r; + NTSTATUS result; fstring mydcname_slash; ZERO_STRUCT(q); @@ -436,20 +436,20 @@ WERROR rpccli_netlogon_getanydcname(struct rpc_pipe_client *cli, /* Initialise input parameters */ slprintf(mydcname_slash, sizeof(fstring)-1, "\\\\%s", mydcname); - init_net_q_getanydcname(&q, mydcname_slash, domainname); + init_net_q_getdcname(&q, mydcname_slash, domainname); /* Marshall data and send request */ - CLI_DO_RPC_WERR(cli, mem_ctx, PI_NETLOGON, NET_GETANYDCNAME, + CLI_DO_RPC(cli, mem_ctx, PI_NETLOGON, NET_GETDCNAME, q, r, qbuf, rbuf, - net_io_q_getanydcname, - net_io_r_getanydcname, - WERR_GENERAL_FAILURE); + net_io_q_getdcname, + net_io_r_getdcname, + NT_STATUS_UNSUCCESSFUL); result = r.status; - if (W_ERROR_IS_OK(result)) { + if (NT_STATUS_IS_OK(result)) { rpcstr_pull_unistr2_fstring(newdcname, &r.uni_dcname); } -- cgit