summaryrefslogtreecommitdiffstats
path: root/source/rpc_client/cli_netlogon.c
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2007-05-29 15:27:13 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:22:54 -0500
commitdef6464c872a5939f0028837254f2c019d2d71c8 (patch)
tree0dfa9e8928a02d94bb3cca900f2ede892325a66a /source/rpc_client/cli_netlogon.c
parentdbee1088bb06a4ccb440d372102eb5c105cc4294 (diff)
downloadsamba-def6464c872a5939f0028837254f2c019d2d71c8.tar.gz
samba-def6464c872a5939f0028837254f2c019d2d71c8.tar.xz
samba-def6464c872a5939f0028837254f2c019d2d71c8.zip
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
Diffstat (limited to 'source/rpc_client/cli_netlogon.c')
-rw-r--r--source/rpc_client/cli_netlogon.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/source/rpc_client/cli_netlogon.c b/source/rpc_client/cli_netlogon.c
index eaa398087b4..f155c736e93 100644
--- a/source/rpc_client/cli_netlogon.c
+++ b/source/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);
}