summaryrefslogtreecommitdiff
path: root/source3/rpc_client/cli_netlogon.c
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2001-09-18 02:49:35 +0000
committerTim Potter <tpot@samba.org>2001-09-18 02:49:35 +0000
commit15a6649c01195f2b385fbfd7e54279c1acc3a878 (patch)
treea52eb35ea4ddd147db807039883bbf1f0240167a /source3/rpc_client/cli_netlogon.c
parent006c8342de3c962f38135aab738e51f0871d440d (diff)
downloadsamba-15a6649c01195f2b385fbfd7e54279c1acc3a878.tar.gz
samba-15a6649c01195f2b385fbfd7e54279c1acc3a878.tar.bz2
samba-15a6649c01195f2b385fbfd7e54279c1acc3a878.zip
Converted cli_net_auth2() and cli_nt_setup_creds() to return NTSTATUS.
(This used to be commit e0bdcbc5994345fdc76f7590dba7bce5f0127d58)
Diffstat (limited to 'source3/rpc_client/cli_netlogon.c')
-rw-r--r--source3/rpc_client/cli_netlogon.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/source3/rpc_client/cli_netlogon.c b/source3/rpc_client/cli_netlogon.c
index b1f4fe0257..324f5dc90f 100644
--- a/source3/rpc_client/cli_netlogon.c
+++ b/source3/rpc_client/cli_netlogon.c
@@ -118,13 +118,14 @@ Ensure that the server credential returned matches the session key
encrypt of the server challenge originally received. JRA.
****************************************************************************/
-BOOL cli_net_auth2(struct cli_state *cli, uint16 sec_chan,
- uint32 neg_flags, DOM_CHAL *srv_chal)
+NTSTATUS cli_net_auth2(struct cli_state *cli, uint16 sec_chan,
+ uint32 neg_flags, DOM_CHAL *srv_chal)
{
prs_struct rbuf;
prs_struct buf;
NET_Q_AUTH_2 q_a;
BOOL ok = False;
+ NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
prs_init(&buf , 1024, cli->mem_ctx, MARSHALL);
prs_init(&rbuf, 0, cli->mem_ctx, UNMARSHALL);
@@ -144,7 +145,7 @@ BOOL cli_net_auth2(struct cli_state *cli, uint16 sec_chan,
DEBUG(0,("cli_net_auth2: Error : failed to marshall NET_Q_AUTH_2 struct.\n"));
prs_mem_free(&buf);
prs_mem_free(&rbuf);
- return False;
+ return result;
}
/* send the data on \PIPE\ */
@@ -153,11 +154,12 @@ BOOL cli_net_auth2(struct cli_state *cli, uint16 sec_chan,
NET_R_AUTH_2 r_a;
ok = net_io_r_auth_2("", &r_a, &rbuf, 0);
-
- if (ok && !NT_STATUS_IS_OK(r_a.status))
+ result = r_a.status;
+
+ if (ok && !NT_STATUS_IS_OK(result))
{
/* report error code */
- DEBUG(0,("cli_net_auth2: Error %s\n", get_nt_error_msg(r_a.status)));
+ DEBUG(0,("cli_net_auth2: Error %s\n", get_nt_error_msg(result)));
ok = False;
}
@@ -200,7 +202,7 @@ password ?).\n", cli->desthost ));
prs_mem_free(&buf);
prs_mem_free(&rbuf);
- return ok;
+ return result;
}
/****************************************************************************