summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2010-05-03 23:25:27 +0200
committerStephen Gallagher <sgallagh@redhat.com>2010-05-07 17:14:32 -0400
commitf40f1592cf53f37430cc50f4c1d696fd46c2f073 (patch)
tree9bb261460ceb9313f42a1634372f18fadb615e55
parentf3c31d11bf365eb6a79c4f698667915a4c81eeb7 (diff)
downloadsssd-f40f1592cf53f37430cc50f4c1d696fd46c2f073.tar.gz
sssd-f40f1592cf53f37430cc50f4c1d696fd46c2f073.tar.bz2
sssd-f40f1592cf53f37430cc50f4c1d696fd46c2f073.zip
Compare the full service name
-rw-r--r--src/providers/ipa/ipa_access.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/providers/ipa/ipa_access.c b/src/providers/ipa/ipa_access.c
index abb6edb7..af761fa0 100644
--- a/src/providers/ipa/ipa_access.c
+++ b/src/providers/ipa/ipa_access.c
@@ -1037,7 +1037,8 @@ enum check_result check_service(struct pam_data *pd,
return RULE_APPLICABLE;
} else {
for (i = 0; i < el->num_values; i++) {
- if (strncasecmp(pd->service, (const char *) el->values[i].data,
+ if (strlen(pd->service) == el->values[i].length &&
+ strncasecmp(pd->service, (const char *) el->values[i].data,
el->values[i].length) == 0) {
DEBUG(9, ("Service [%s] found, rule applies.\n",
pd->service));