From 28943451c1b0f01845266b0f13cc3772c2b1d66f Mon Sep 17 00:00:00 2001 From: Sumit Bose Date: Mon, 3 Sep 2012 13:53:55 +0200 Subject: Check flat names when searching for sub-domains as well --- src/util/usertools.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/util') diff --git a/src/util/usertools.c b/src/util/usertools.c index adef2b00..ea640fb3 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]; } } -- cgit