summaryrefslogtreecommitdiff
path: root/source/nsswitch/winbindd_util.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/nsswitch/winbindd_util.c')
-rw-r--r--source/nsswitch/winbindd_util.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source/nsswitch/winbindd_util.c b/source/nsswitch/winbindd_util.c
index daa3abb3400..2016c27881d 100644
--- a/source/nsswitch/winbindd_util.c
+++ b/source/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 */