]> git.samba.org - samba.git/commitdiff
winbindd: prepare find_auth_domain() transitive trusts on a DC
authorStefan Metzmacher <metze@samba.org>
Mon, 15 Jan 2018 11:06:50 +0000 (12:06 +0100)
committerRalph Boehme <slow@samba.org>
Sat, 10 Feb 2018 07:35:16 +0000 (08:35 +0100)
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13235

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/winbindd/winbindd_pam.c

index 52a24efc531c047d6fd20192af8c29ac2d427e39..a14b801cb9434895cfe5d2fb5e6bdc6541e2674a 100644 (file)
@@ -395,8 +395,14 @@ struct winbindd_domain *find_auth_domain(uint8_t flags,
                        DEBUG(3, ("Authentication for domain [%s] refused "
                                  "as it is not a trusted domain\n",
                                  domain_name));
+                       return NULL;
                }
-               return domain;
+
+               if (domain->secure_channel_type != SEC_CHAN_NULL) {
+                       return domain;
+               }
+
+               return domain->routing_domain;
        }
 
        if (strequal(domain_name, get_global_sam_name())) {