]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
winbind: check for allowed domains in winbindd_dual_pam_chng_pswd_auth_crap()
authorRalph Boehme <slow@samba.org>
Mon, 11 Jan 2021 16:19:05 +0000 (17:19 +0100)
committerJeremy Allison <jra@samba.org>
Thu, 21 Jan 2021 21:48:30 +0000 (21:48 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14602

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/winbindd/winbindd_pam.c

index 25ebd82c638a641582378e60e27a16e9a8912e73..5dcfeb11b9905a2fcf9d8acb31dfc3e1d13a573e 100644 (file)
@@ -3106,6 +3106,15 @@ enum winbindd_result winbindd_dual_pam_chng_pswd_auth_crap(struct winbindd_domai
                fstrcpy(domain,lp_workgroup());
        }
 
+       if (!is_allowed_domain(domain)) {
+               DBG_NOTICE("Authentication failed for user [%s] "
+                          "from firewalled domain [%s]\n",
+                          state->request->data.chng_pswd_auth_crap.user,
+                          domain);
+               result = NT_STATUS_AUTHENTICATION_FIREWALL_FAILED;
+               goto done;
+       }
+
        if(!*user) {
                fstrcpy(user, state->request->data.chng_pswd_auth_crap.user);
        }