mirror of
https://github.com/samba-team/samba.git
synced 2025-02-28 01:58:17 +03:00
winbindd: call add_trusted_domain_from_auth() in winbindd_pam_auth_crap_done()
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13262 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
parent
021d75fb22
commit
42e4453968
@ -119,6 +119,23 @@ static void winbindd_pam_auth_crap_done(struct tevent_req *subreq)
|
||||
tevent_req_nterror(req, map_nt_error_from_unix(err));
|
||||
return;
|
||||
}
|
||||
|
||||
if (NT_STATUS_IS_OK(NT_STATUS(state->response->data.auth.nt_status)) &&
|
||||
(state->flags & WBFLAG_PAM_INFO3_TEXT))
|
||||
{
|
||||
bool ok;
|
||||
|
||||
ok = add_trusted_domain_from_auth(
|
||||
state->response->data.auth.validation_level,
|
||||
&state->response->data.auth.info3,
|
||||
&state->response->data.auth.info6);
|
||||
if (!ok) {
|
||||
DBG_ERR("add_trusted_domain_from_auth failed\n");
|
||||
tevent_req_nterror(req, NT_STATUS_LOGON_FAILURE);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
tevent_req_done(req);
|
||||
}
|
||||
|
||||
@ -157,22 +174,6 @@ NTSTATUS winbindd_pam_auth_crap_recv(struct tevent_req *req,
|
||||
|
||||
}
|
||||
|
||||
if (NT_STATUS_IS_OK(NT_STATUS(state->response->data.auth.nt_status)) &&
|
||||
(state->flags & WBFLAG_PAM_INFO3_TEXT))
|
||||
{
|
||||
bool ok;
|
||||
|
||||
ok = add_trusted_domain_from_auth(
|
||||
state->response->data.auth.validation_level,
|
||||
&state->response->data.auth.info3,
|
||||
&state->response->data.auth.info6);
|
||||
if (!ok) {
|
||||
DBG_ERR("add_trusted_domain_from_auth failed\n");
|
||||
set_auth_errors(response, NT_STATUS_LOGON_FAILURE);
|
||||
return NT_STATUS_LOGON_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
*response = *state->response;
|
||||
response->result = WINBINDD_PENDING;
|
||||
state->response = talloc_move(response, &state->response);
|
||||
|
Loading…
x
Reference in New Issue
Block a user