summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2012-09-03 13:53:55 +0200
committerJakub Hrozek <jhrozek@redhat.com>2012-09-04 10:22:08 +0200
commit28943451c1b0f01845266b0f13cc3772c2b1d66f (patch)
treecbdb9050ce55e0ed7d0646e2ba514ae330daa674 /src
parentf130a609a840d4548c795ce5e63afb5891358e20 (diff)
downloadsssd-28943451c1b0f01845266b0f13cc3772c2b1d66f.tar.gz
sssd-28943451c1b0f01845266b0f13cc3772c2b1d66f.tar.xz
sssd-28943451c1b0f01845266b0f13cc3772c2b1d66f.zip
Check flat names when searching for sub-domains as well
Diffstat (limited to 'src')
-rw-r--r--src/util/usertools.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/util/usertools.c b/src/util/usertools.c
index adef2b002..ea640fb30 100644
--- a/src/util/usertools.c
+++ b/src/util/usertools.c
@@ -236,7 +236,9 @@ static struct sss_domain_info * match_any_domain_or_subdomain_name (
return dom;
for (i = 0; i < dom->subdomain_count; i++) {
- if (strcasecmp(dom->subdomains[i]->name, dmatch) == 0) {
+ if (strcasecmp(dom->subdomains[i]->name, dmatch) == 0 ||
+ (dom->subdomains[i]->flat_name != NULL &&
+ strcasecmp(dom->subdomains[i]->flat_name, dmatch) == 0)) {
return dom->subdomains[i];
}
}