Accept any alias, not just the last value

If the entry's krbPrincipalName attribute is multi-valued, accept any of
the values, not just the last one we happen to examine.

https://fedorahosted.org/freeipa/ticket/3966

Reviewed-By: Nathaniel McCallum <npmccallum@redhat.com>
This commit is contained in:
Nalin Dahyabhai 2013-10-07 15:24:29 -04:00 committed by Petr Viktorin
parent 9f2c4705d7
commit fabd5cd62f

View File

@ -776,6 +776,9 @@ static krb5_error_code ipadb_find_principal(krb5_context kcontext,
} else { } else {
found = (strcmp(vals[i]->bv_val, (*principal)) == 0); found = (strcmp(vals[i]->bv_val, (*principal)) == 0);
} }
if (found) {
break;
}
} }
ldap_value_free_len(vals); ldap_value_free_len(vals);