diff options
author | Stephen Gallagher <sgallagh@redhat.com> | 2011-09-23 14:03:09 -0400 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2011-10-26 13:43:58 -0400 |
commit | c417f0b8cde38ff5cc10241383f1481e3440879c (patch) | |
tree | 69c53178fd98b24e3ff215ac431f10680ca88376 /src | |
parent | cb47ceb86a3c31b300190da57c0a56983fe56234 (diff) | |
download | sssd-c417f0b8cde38ff5cc10241383f1481e3440879c.tar.gz sssd-c417f0b8cde38ff5cc10241383f1481e3440879c.tar.xz sssd-c417f0b8cde38ff5cc10241383f1481e3440879c.zip |
RHEL5: Remove UTF8 support for RHEL5
Diffstat (limited to 'src')
-rw-r--r-- | src/providers/ipa/hbac_evaluator.c | 36 |
1 files changed, 4 insertions, 32 deletions
diff --git a/src/providers/ipa/hbac_evaluator.c b/src/providers/ipa/hbac_evaluator.c index 476ad6482..db88f58d9 100644 --- a/src/providers/ipa/hbac_evaluator.c +++ b/src/providers/ipa/hbac_evaluator.c @@ -25,8 +25,6 @@ #include <stdlib.h> #include <string.h> -#include <unistr.h> -#include <unicase.h> #include <errno.h> #include "providers/ipa/ipa_hbac.h" @@ -255,21 +253,8 @@ static errno_t hbac_evaluate_element(struct hbac_rule_element *rule_el, rule_name = (const uint8_t *) rule_el->names[i]; req_name = (const uint8_t *) req_el->name; - /* Do a case-insensitive comparison. - * The input must be encoded in UTF8. - * We have no way of knowing the language, - * so we'll pass NULL for the language and - * hope for the best. - */ - errno = 0; - ret = u8_casecmp(rule_name, u8_strlen(rule_name), - req_name, u8_strlen(req_name), - NULL, NULL, &result); - if (ret < 0) { - return errno; - } - - if (result == 0) { + /* Do a case-insensitive comparison. */ + if (strcasecmp(rule_name, req_name) == 0) { *matched = true; return EOK; } @@ -287,21 +272,8 @@ static errno_t hbac_evaluate_element(struct hbac_rule_element *rule_el, for (j = 0; req_el->groups[j]; j++) { req_name = (const uint8_t *) req_el->groups[j]; - /* Do a case-insensitive comparison. - * The input must be encoded in UTF8. - * We have no way of knowing the language, - * so we'll pass NULL for the language and - * hope for the best. - */ - errno = 0; - ret = u8_casecmp(rule_name, u8_strlen(rule_name), - req_name, u8_strlen(req_name), - NULL, NULL, &result); - if (ret < 0) { - return errno; - } - - if (result == 0) { + /* Do a case-insensitive comparison. */ + if (strcasecmp(rule_name, req_name) == 0) { *matched = true; return EOK; } |