]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
winbindd: find_auth_domain() and find_lookup_domain_from_name() should handle namespaces
authorStefan Metzmacher <metze@samba.org>
Tue, 5 Jun 2018 02:29:07 +0000 (04:29 +0200)
committerRalph Boehme <slow@samba.org>
Sat, 22 Feb 2025 17:03:27 +0000 (17:03 +0000)
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 22 17:03:27 UTC 2025 on atb-devel-224

selftest/knownfail.d/upn_handling
source3/winbindd/winbindd_pam.c
source3/winbindd/winbindd_util.c

index 7527da4cc42827c644d82fb8adc166c551ffb60c..b00792e1349db383157428df72c09235d68bed8d 100644 (file)
@@ -2,5 +2,4 @@
 ^samba3\.wbinfo_user_info\.user_info\.upn\.alice.fl2008r2dc
 ^samba3\.wbinfo_user_info\.user_info\.domain\.jane.fl2008r2dc
 ^samba3\.wbinfo_user_info\.user_info\.upn\.jane\.doe.fl2008r2dc
-^samba3\.wbinfo_user_info\.name_to_sid\.upn\.testdenied_upn.fl2008r2dc
 ^samba3\.wbinfo_user_info\.user_info\.upn\.testdenied_upn.fl2008r2dc
index 450030fcbf1707c9dc76fd569555d59d30c253ba..c7bb932230dfff34d0650fc06cfde0e2c3e2a64e 100644 (file)
@@ -511,7 +511,7 @@ struct winbindd_domain *find_auth_domain(uint8_t flags,
        struct winbindd_domain *domain;
 
        if (IS_DC) {
-               domain = find_domain_from_name_noinit(domain_name);
+               domain = find_routing_from_namespace_noinit(domain_name);
                if (domain == NULL) {
                        DEBUG(3, ("Authentication for domain [%s] refused "
                                  "as it is not a trusted domain\n",
@@ -519,11 +519,7 @@ struct winbindd_domain *find_auth_domain(uint8_t flags,
                        return NULL;
                }
 
-               if (domain->secure_channel_type != SEC_CHAN_NULL) {
-                       return domain;
-               }
-
-               return domain->routing_domain;
+               return domain;
        }
 
        if (strequal(domain_name, get_global_sam_name())) {
index 8cd9b42b307539441374bb034e9c574e1f41fd81..07b5969c5834570c897b78bda82031a4e93508e6 100644 (file)
@@ -1912,16 +1912,12 @@ struct winbindd_domain *find_lookup_domain_from_name(const char *domain_name)
        if (IS_DC) {
                struct winbindd_domain *domain = NULL;
 
-               domain = find_domain_from_name_noinit(domain_name);
+               domain = find_routing_from_namespace_noinit(domain_name);
                if (domain == NULL) {
                        return NULL;
                }
 
-               if (domain->secure_channel_type != SEC_CHAN_NULL) {
-                       return domain;
-               }
-
-               return domain->routing_domain;
+               return domain;
        }
 
        return find_our_domain();