summaryrefslogtreecommitdiffstats
path: root/source3/rpc_client/cli_login.c
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1999-10-19 19:55:43 +0000
committerLuke Leighton <lkcl@samba.org>1999-10-19 19:55:43 +0000
commit87d92a1f1182a6b4e4dbe91d7f574c7ac8aecb21 (patch)
tree0fc88c021cf841c8487e1614b77022f12fa4ba0e /source3/rpc_client/cli_login.c
parentbb6de2f1e938d2b8fa565ff2196b666053fa957c (diff)
downloadsamba-87d92a1f1182a6b4e4dbe91d7f574c7ac8aecb21.tar.gz
samba-87d92a1f1182a6b4e4dbe91d7f574c7ac8aecb21.tar.xz
samba-87d92a1f1182a6b4e4dbe91d7f574c7ac8aecb21.zip
need status codes from cli_net_req_chal() and cli_net_auth2().
this format is what i would like _all_ these functions to be (returning status codes, not BOOL) but that's a horrendous amount of work at the moment :) (This used to be commit 02f240604241367f146b26934ad1a1b2563430de)
Diffstat (limited to 'source3/rpc_client/cli_login.c')
-rw-r--r--source3/rpc_client/cli_login.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/source3/rpc_client/cli_login.c b/source3/rpc_client/cli_login.c
index 858327a1b21..06a31a607e0 100644
--- a/source3/rpc_client/cli_login.c
+++ b/source3/rpc_client/cli_login.c
@@ -29,14 +29,15 @@ extern int DEBUGLEVEL;
Initialize domain session credentials.
****************************************************************************/
-BOOL cli_nt_setup_creds(struct cli_state *cli, uint16 fnum,
+uint32 cli_nt_setup_creds(struct cli_state *cli, uint16 fnum,
const char* trust_acct,
+ const char* srv_name,
unsigned char trust_pwd[16],
uint16 sec_chan)
{
DOM_CHAL clnt_chal;
DOM_CHAL srv_chal;
-
+ uint32 ret;
UTIME zerotime;
/******************* Request Challenge ********************/
@@ -44,10 +45,11 @@ BOOL cli_nt_setup_creds(struct cli_state *cli, uint16 fnum,
generate_random_buffer( clnt_chal.data, 8, False);
/* send a client challenge; receive a server challenge */
- if (!cli_net_req_chal(cli, fnum, &clnt_chal, &srv_chal))
+ ret = cli_net_req_chal(cli, fnum, srv_name, &clnt_chal, &srv_chal);
+ if (ret != 0)
{
DEBUG(0,("cli_nt_setup_creds: request challenge failed\n"));
- return False;
+ return ret;
}
/**************** Long-term Session key **************/
@@ -67,13 +69,14 @@ BOOL cli_nt_setup_creds(struct cli_state *cli, uint16 fnum,
* Receive an auth-2 challenge response and check it.
*/
- if (!cli_net_auth2(cli, fnum, trust_acct, sec_chan, 0x000001ff, &srv_chal))
+ ret = cli_net_auth2(cli, fnum, trust_acct, srv_name,
+ sec_chan, 0x000001ff, &srv_chal);
+ if (ret != 0x0)
{
DEBUG(0,("cli_nt_setup_creds: auth2 challenge failed\n"));
- return False;
}
- return True;
+ return ret;
}
/****************************************************************************