mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
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.
This commit is contained in:
parent
8cb2aee626
commit
d8de2d1b7b
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user