mirror of
https://github.com/samba-team/samba.git
synced 2025-01-12 09:18:10 +03:00
Remove some unused code
This commit is contained in:
parent
e89bbab1b8
commit
b60a681dd0
@ -22,97 +22,6 @@
|
||||
|
||||
#include "includes.h"
|
||||
|
||||
/* LSA Request Challenge. Sends our challenge to server, then gets
|
||||
server response. These are used to generate the credentials.
|
||||
The sent and received challenges are stored in the netlog pipe
|
||||
private data. Only call this via rpccli_netlogon_setup_creds(). JRA.
|
||||
*/
|
||||
|
||||
/* instead of rpccli_net_req_chal() we use rpccli_netr_ServerReqChallenge() now - gd */
|
||||
|
||||
#if 0
|
||||
/****************************************************************************
|
||||
LSA Authenticate 2
|
||||
|
||||
Send the client credential, receive back a server credential.
|
||||
Ensure that the server credential returned matches the session key
|
||||
encrypt of the server challenge originally received. JRA.
|
||||
****************************************************************************/
|
||||
|
||||
NTSTATUS rpccli_net_auth2(struct rpc_pipe_client *cli,
|
||||
uint16 sec_chan,
|
||||
uint32 *neg_flags, DOM_CHAL *srv_chal)
|
||||
{
|
||||
prs_struct qbuf, rbuf;
|
||||
NET_Q_AUTH_2 q;
|
||||
NET_R_AUTH_2 r;
|
||||
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
|
||||
fstring machine_acct;
|
||||
|
||||
if ( sec_chan == SEC_CHAN_DOMAIN )
|
||||
fstr_sprintf( machine_acct, "%s$", lp_workgroup() );
|
||||
else
|
||||
fstrcpy( machine_acct, cli->mach_acct );
|
||||
|
||||
/* create and send a MSRPC command with api NET_AUTH2 */
|
||||
|
||||
DEBUG(4,("cli_net_auth2: srv:%s acct:%s sc:%x mc: %s chal %s neg: %x\n",
|
||||
cli->srv_name_slash, machine_acct, sec_chan, global_myname(),
|
||||
credstr(cli->clnt_cred.challenge.data), *neg_flags));
|
||||
|
||||
/* store the parameters */
|
||||
|
||||
init_q_auth_2(&q, cli->srv_name_slash, machine_acct,
|
||||
sec_chan, global_myname(), &cli->clnt_cred.challenge,
|
||||
*neg_flags);
|
||||
|
||||
/* turn parameters into data stream */
|
||||
|
||||
CLI_DO_RPC(cli, mem_ctx, PI_NETLOGON, NET_AUTH2,
|
||||
q, r,
|
||||
qbuf, rbuf,
|
||||
net_io_q_auth_2,
|
||||
net_io_r_auth_2,
|
||||
NT_STATUS_UNSUCCESSFUL);
|
||||
|
||||
result = r.status;
|
||||
|
||||
if (NT_STATUS_IS_OK(result)) {
|
||||
UTIME zerotime;
|
||||
|
||||
/*
|
||||
* Check the returned value using the initial
|
||||
* server received challenge.
|
||||
*/
|
||||
|
||||
zerotime.time = 0;
|
||||
if (cred_assert( &r.srv_chal, cli->sess_key, srv_chal, zerotime) == 0) {
|
||||
|
||||
/*
|
||||
* Server replied with bad credential. Fail.
|
||||
*/
|
||||
DEBUG(0,("cli_net_auth2: server %s replied with bad credential (bad machine \
|
||||
password ?).\n", cli->cli->desthost ));
|
||||
return NT_STATUS_ACCESS_DENIED;
|
||||
}
|
||||
*neg_flags = r.srv_flgs.neg_flags;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
LSA Authenticate 2
|
||||
|
||||
Send the client credential, receive back a server credential.
|
||||
The caller *must* ensure that the server credential returned matches the session key
|
||||
encrypt of the server challenge originally received. JRA.
|
||||
****************************************************************************/
|
||||
|
||||
/* instead of rpccli_net_auth2() we use rpccli_netr_ServerAuthenticate2() now - gd */
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
Wrapper function that uses the auth and auth2 calls to set up a NETLOGON
|
||||
credentials chain. Stores the credentials in the struct dcinfo in the
|
||||
|
Loading…
Reference in New Issue
Block a user