summaryrefslogtreecommitdiffstats
path: root/daemons/ipa-kdb/ipa_kdb_common.c
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2011-07-20 15:44:11 -0400
committerSimo Sorce <ssorce@redhat.com>2011-08-26 08:24:50 -0400
commitd8de2d1b7bf64a0b7f695b4a95e4a5ea29332c4a (patch)
tree86177d5e5c2e0e4eba9ad598b65372c809a7190c /daemons/ipa-kdb/ipa_kdb_common.c
parent8cb2aee626e7be3e9cde7195dabfebb3cc34cb6a (diff)
downloadfreeipa-d8de2d1b7bf64a0b7f695b4a95e4a5ea29332c4a.tar.gz
freeipa-d8de2d1b7bf64a0b7f695b4a95e4a5ea29332c4a.tar.xz
freeipa-d8de2d1b7bf64a0b7f695b4a95e4a5ea29332c4a.zip
ipa-kdb: Be flexible
Although the proper values for booleans from LDAP should be only uppercase, 389ds does allow wrong cased values without complaining. And we still have some places where the wrong case is used. Avoid getting frustrating errors when reading these values out.
Diffstat (limited to 'daemons/ipa-kdb/ipa_kdb_common.c')
-rw-r--r--daemons/ipa-kdb/ipa_kdb_common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/daemons/ipa-kdb/ipa_kdb_common.c b/daemons/ipa-kdb/ipa_kdb_common.c
index 21b7a4df4..6f67be501 100644
--- a/daemons/ipa-kdb/ipa_kdb_common.c
+++ b/daemons/ipa-kdb/ipa_kdb_common.c
@@ -372,10 +372,10 @@ int ipadb_ldap_attr_to_bool(LDAP *lcontext, LDAPMessage *le,
vals = ldap_get_values_len(lcontext, le, attrname);
if (vals) {
- if (strcmp("TRUE", vals[0]->bv_val) == 0) {
+ if (strcasecmp("TRUE", vals[0]->bv_val) == 0) {
*result = true;
ret = 0;
- } else if (strcmp("FALSE", vals[0]->bv_val) == 0) {
+ } else if (strcasecmp("FALSE", vals[0]->bv_val) == 0) {
*result = false;
ret = 0;
} else {