summaryrefslogtreecommitdiff
path: root/source3/nsswitch
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2002-08-18 15:46:03 +0000
committerAndrew Tridgell <tridge@samba.org>2002-08-18 15:46:03 +0000
commitd86b5fff06bdb899e1a197b534e2037792d09dc4 (patch)
tree771293264781bbcc359052a154fbb312533710be /source3/nsswitch
parent11fadbee748a64535de47f7508e5764cc04fec70 (diff)
downloadsamba-d86b5fff06bdb899e1a197b534e2037792d09dc4.tar.gz
samba-d86b5fff06bdb899e1a197b534e2037792d09dc4.tar.bz2
samba-d86b5fff06bdb899e1a197b534e2037792d09dc4.zip
be a bit more paranoid about not getting duplicate domain names (can
happen when the LDAP call to get the flatname for the primary domain fails) (This used to be commit 8d40f34e2f5188f15f414e807d023bfea7bd8c8e)
Diffstat (limited to 'source3/nsswitch')
-rw-r--r--source3/nsswitch/winbindd_util.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source3/nsswitch/winbindd_util.c b/source3/nsswitch/winbindd_util.c
index daa3abb340..2016c27881 100644
--- a/source3/nsswitch/winbindd_util.c
+++ b/source3/nsswitch/winbindd_util.c
@@ -83,10 +83,16 @@ static struct winbindd_domain *add_trusted_domain(const char *domain_name, const
/* We can't call domain_list() as this function is called from
init_domain_list() and we'll get stuck in a loop. */
for (domain = _domain_list; domain; domain = domain->next) {
- if (strcmp(domain_name, domain->name) == 0 ||
- strcmp(domain_name, domain->alt_name) == 0) {
+ if (strcasecmp(domain_name, domain->name) == 0 ||
+ strcasecmp(domain_name, domain->alt_name) == 0) {
return domain;
}
+ if (alt_name && *alt_name) {
+ if (strcasecmp(alt_name, domain->name) == 0 ||
+ strcasecmp(alt_name, domain->alt_name) == 0) {
+ return domain;
+ }
+ }
}
/* Create new domain entry */