#include "includes.h"
-extern struct dcinfo last_dcinfo;
-extern BOOL server_auth2_negotiated;
extern userdom_struct current_user_info;
#undef DBGC_CLASS
creds_server_init(p->dc,
&p->dc->clnt_chal, /* Stored client chal. */
&p->dc->srv_chal, /* Stored server chal. */
- p->dc->mach_pw,
+ (const char *)p->dc->mach_pw,
&srv_chal_out);
/* Check client credentials are valid. */
creds_server_init(p->dc,
&p->dc->clnt_chal, /* Stored client chal. */
&p->dc->srv_chal, /* Stored server chal. */
- p->dc->mach_pw,
+ (const char *)p->dc->mach_pw,
&srv_chal_out);
/* Check client credentials are valid. */
fstrcpy(p->dc->mach_acct, mach_acct);
fstrcpy(p->dc->remote_machine, remote_machine);
+ fstrcpy(p->dc->domain, lp_workgroup() );
- server_auth2_negotiated = True;
p->dc->authenticated = True;
- last_dcinfo = *p->dc;
- //secrets_store_schannel_session_info(p->dc);
+ /* Store off the state so we can continue after client disconnect. */
+ become_root();
+ secrets_store_schannel_session_info(p->mem_ctx, p->dc);
+ unbecome_root();
+
return r_u->status;
}
/* checks and updates credentials. creates reply credentials */
if (!creds_server_step(p->dc, &q_u->sam_id.client.cred, &r_u->srv_creds)) {
- DEBUG(0,("_net_sam_logoff: creds_server_step failed. Rejecting auth "
+ DEBUG(0,("_net_sam_logon: creds_server_step failed. Rejecting auth "
"request from client %s machine account %s\n",
p->dc->remote_machine, p->dc->mach_acct ));
return NT_STATUS_ACCESS_DENIED;
if (!make_user_info_netlogon_network(&user_info,
nt_username, nt_domain,
wksname,
+ ctr->auth.id2.param_ctrl,
ctr->auth.id2.lm_chal_resp.buffer,
ctr->auth.id2.lm_chal_resp.str_str_len,
ctr->auth.id2.nt_chal_resp.buffer,
if (!make_user_info_netlogon_interactive(&user_info,
nt_username, nt_domain,
- nt_workstation, chal,
+ nt_workstation,
+ ctr->auth.id1.param_ctrl,
+ chal,
ctr->auth.id1.lm_owf.data,
ctr->auth.id1.nt_owf.data,
p->dc->sess_key)) {