From d8de2d1b7bf64a0b7f695b4a95e4a5ea29332c4a Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Wed, 20 Jul 2011 15:44:11 -0400 Subject: 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. --- daemons/ipa-kdb/ipa_kdb_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'daemons/ipa-kdb/ipa_kdb_common.c') 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 { -- cgit