winbindd: WBFLAG_PAM_AUTH_PAC should call add_trusted_domain_from_auth() is the resul...
authorStefan Metzmacher <metze@samba.org>
Tue, 23 Jan 2018 22:13:12 +0000 (23:13 +0100)
committerRalph Boehme <slow@samba.org>
Sat, 10 Feb 2018 12:08:50 +0000 (13:08 +0100)
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>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Sat Feb 10 13:08:50 CET 2018 on sn-devel-144

source3/winbindd/winbindd_pam_auth_crap.c

index 6fb65a274611ffe8ab6ed7080710e945094789c7..046517d12457b1cab3416e3ce520de66daf5ff8c 100644 (file)
@@ -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);
        }