]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
winbind: check for allowed domains in winbindd_pam_auth_pac_verify()
authorRalph Boehme <slow@samba.org>
Thu, 14 Jan 2021 09:42:53 +0000 (10:42 +0100)
committerKarolin Seeger <kseeger@samba.org>
Thu, 28 Jan 2021 09:17:15 +0000 (09:17 +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>
(cherry picked from commit da474ddd13d84f07f5da81c843e651844f33a003)

source3/winbindd/winbindd_pam.c

index d7cbcffa6b96150db40b8a06e2ad5ab891380996..94416498be7689216c82c83d9bc97c64d1c239ab 100644 (file)
@@ -3324,6 +3324,14 @@ NTSTATUS winbindd_pam_auth_pac_verify(struct winbindd_cli_state *state,
                return result;
        }
 
+       if (!is_allowed_domain(info6->base.logon_domain.string)) {
+               DBG_NOTICE("Authentication failed for user [%s] "
+                          "from firewalled domain [%s]\n",
+                          info6->base.account_name.string,
+                          info6->base.logon_domain.string);
+               return NT_STATUS_AUTHENTICATION_FIREWALL_FAILED;
+       }
+
        result = map_info6_to_validation(state->mem_ctx,
                                         info6,
                                         &validation_level,