summaryrefslogtreecommitdiffstats
path: root/source3/rpc_client
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
commitd8e454664a97385d798ad53633856044f928a491 (patch)
tree57efd6c2ccede0a1c244ee086f1fa5cae9faa9cf /source3/rpc_client
parent6a824bb1206228b4afa0e61a06c68027d0d9db59 (diff)
downloadsamba-d8e454664a97385d798ad53633856044f928a491.tar.gz
samba-d8e454664a97385d798ad53633856044f928a491.tar.xz
samba-d8e454664a97385d798ad53633856044f928a491.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 (This used to be commit def6464c872a5939f0028837254f2c019d2d71c8)
Diffstat (limited to 'source3/rpc_client')
-rw-r--r--source3/rpc_client/cli_netlogon.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/source3/rpc_client/cli_netlogon.c b/source3/rpc_client/cli_netlogon.c
index eaa398087b4..f155c736e93 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);
}