From: Stefan Metzmacher Date: Tue, 23 Jan 2018 22:13:12 +0000 (+0100) Subject: winbindd: WBFLAG_PAM_AUTH_PAC should call add_trusted_domain_from_auth() is the resul... X-Git-Tag: samba-4.8.0rc3~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ca87709326280a34a35fdb577d48ad339cb21a64;p=thirdparty%2Fsamba.git winbindd: WBFLAG_PAM_AUTH_PAC should call add_trusted_domain_from_auth() is the result is trusted Bug: https://bugzilla.samba.org/show_bug.cgi?id=13262 Signed-off-by: Stefan Metzmacher Reviewed-by: Ralph Boehme Autobuild-User(master): Ralph Böhme Autobuild-Date(master): Sat Feb 10 13:08:50 CET 2018 on sn-devel-144 (cherry picked from commit 597e755328940fc964b861333b557b0650666b24) Autobuild-User(v4-8-test): Stefan Metzmacher Autobuild-Date(v4-8-test): Sun Feb 11 15:37:51 CET 2018 on sn-devel-144 --- diff --git a/source3/winbindd/winbindd_pam_auth_crap.c b/source3/winbindd/winbindd_pam_auth_crap.c index 6fb65a27461..046517d1245 100644 --- a/source3/winbindd/winbindd_pam_auth_crap.c +++ b/source3/winbindd/winbindd_pam_auth_crap.c @@ -81,6 +81,20 @@ struct tevent_req *winbindd_pam_auth_crap_send( return tevent_req_post(req, ev); } + if (is_trusted && (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_post(req, ev); + } + } + tevent_req_done(req); return tevent_req_post(req, ev); }