summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/include/rpc_netlogon.h2
-rw-r--r--source3/rpc_client/cli_netlogon.c14
-rw-r--r--source3/rpc_parse/parse_net.c2
-rw-r--r--source3/rpcclient/cmd_netlogon.c14
4 files changed, 16 insertions, 16 deletions
diff --git a/source3/include/rpc_netlogon.h b/source3/include/rpc_netlogon.h
index 163b18a266..940709346f 100644
--- a/source3/include/rpc_netlogon.h
+++ b/source3/include/rpc_netlogon.h
@@ -442,7 +442,7 @@ typedef struct net_q_getdcname {
typedef struct net_r_getdcname {
uint32 ptr_dcname;
UNISTR2 uni_dcname;
- NTSTATUS status;
+ WERROR status;
} NET_R_GETDCNAME;
/* NET_Q_TRUST_DOM_LIST - LSA Query Trusted Domains */
diff --git a/source3/rpc_client/cli_netlogon.c b/source3/rpc_client/cli_netlogon.c
index 1123daaeec..e6695f647e 100644
--- a/source3/rpc_client/cli_netlogon.c
+++ b/source3/rpc_client/cli_netlogon.c
@@ -420,14 +420,14 @@ WERROR rpccli_netlogon_getanydcname(struct rpc_pipe_client *cli,
/* GetDCName */
-NTSTATUS rpccli_netlogon_getdcname(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx, const char *mydcname,
- const char *domainname, fstring newdcname)
+WERROR 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_GETDCNAME q;
NET_R_GETDCNAME r;
- NTSTATUS result;
+ WERROR result;
fstring mydcname_slash;
ZERO_STRUCT(q);
@@ -440,16 +440,16 @@ NTSTATUS rpccli_netlogon_getdcname(struct rpc_pipe_client *cli,
/* Marshall data and send request */
- CLI_DO_RPC(cli, mem_ctx, PI_NETLOGON, NET_GETDCNAME,
+ CLI_DO_RPC_WERR(cli, mem_ctx, PI_NETLOGON, NET_GETDCNAME,
q, r,
qbuf, rbuf,
net_io_q_getdcname,
net_io_r_getdcname,
- NT_STATUS_UNSUCCESSFUL);
+ WERR_GENERAL_FAILURE);
result = r.status;
- if (NT_STATUS_IS_OK(result)) {
+ if (W_ERROR_IS_OK(result)) {
rpcstr_pull_unistr2_fstring(newdcname, &r.uni_dcname);
}
diff --git a/source3/rpc_parse/parse_net.c b/source3/rpc_parse/parse_net.c
index 20e4dea23c..15bf2b3283 100644
--- a/source3/rpc_parse/parse_net.c
+++ b/source3/rpc_parse/parse_net.c
@@ -644,7 +644,7 @@ BOOL net_io_r_getdcname(const char *desc, NET_R_GETDCNAME *r_t, prs_struct *ps,
if (!prs_align(ps))
return False;
- if (!prs_ntstatus("status", ps, depth, &r_t->status))
+ if (!prs_werror("status", ps, depth, &r_t->status))
return False;
return True;
diff --git a/source3/rpcclient/cmd_netlogon.c b/source3/rpcclient/cmd_netlogon.c
index 77f01e8885..93b900e25e 100644
--- a/source3/rpcclient/cmd_netlogon.c
+++ b/source3/rpcclient/cmd_netlogon.c
@@ -76,17 +76,17 @@ static WERROR cmd_netlogon_getanydcname(struct rpc_pipe_client *cli,
return result;
}
-static NTSTATUS cmd_netlogon_getdcname(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx, int argc,
- const char **argv)
+static WERROR cmd_netlogon_getdcname(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx, int argc,
+ const char **argv)
{
fstring dcname;
- NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+ WERROR result = WERR_GENERAL_FAILURE;
int old_timeout;
if (argc != 2) {
fprintf(stderr, "Usage: %s domainname\n", argv[0]);
- return NT_STATUS_OK;
+ return WERR_OK;
}
/* Make sure to wait for our DC's reply */
@@ -96,7 +96,7 @@ static NTSTATUS cmd_netlogon_getdcname(struct rpc_pipe_client *cli,
cli_set_timeout(cli->cli, old_timeout);
- if (!NT_STATUS_IS_OK(result))
+ if (!W_ERROR_IS_OK(result))
goto done;
/* Display results */
@@ -580,7 +580,7 @@ struct cmd_set netlogon_commands[] = {
{ "logonctrl2", RPC_RTYPE_NTSTATUS, cmd_netlogon_logon_ctrl2, NULL, PI_NETLOGON, NULL, "Logon Control 2", "" },
{ "getanydcname", RPC_RTYPE_WERROR, NULL, cmd_netlogon_getanydcname, PI_NETLOGON, NULL, "Get trusted DC name", "" },
- { "getdcname", RPC_RTYPE_NTSTATUS, cmd_netlogon_getdcname, NULL, PI_NETLOGON, NULL, "Get trusted PDC name", "" },
+ { "getdcname", RPC_RTYPE_WERROR, NULL, cmd_netlogon_getdcname, PI_NETLOGON, NULL, "Get trusted PDC name", "" },
{ "dsr_getdcname", RPC_RTYPE_WERROR, NULL, cmd_netlogon_dsr_getdcname, PI_NETLOGON, NULL, "Get trusted DC name", "" },
{ "dsr_getdcnameex", RPC_RTYPE_WERROR, NULL, cmd_netlogon_dsr_getdcnameex, PI_NETLOGON, NULL, "Get trusted DC name", "" },
{ "dsr_getdcnameex2", RPC_RTYPE_WERROR, NULL, cmd_netlogon_dsr_getdcnameex2, PI_NETLOGON, NULL, "Get trusted DC name", "" },