summaryrefslogtreecommitdiffstats
path: root/daemons/ipa-kdb/ipa_kdb_principals.c
diff options
context:
space:
mode:
authorNalin Dahyabhai <nalin@dahyabhai.net>2013-10-07 15:24:29 -0400
committerPetr Viktorin <pviktori@redhat.com>2014-05-30 09:48:05 +0200
commitfabd5cd62f0693c5071ac60131dff2dfe825bff7 (patch)
tree9a22e61ceb266e228b9619607bb8896eda73cc83 /daemons/ipa-kdb/ipa_kdb_principals.c
parent9f2c4705d7e2fa83be95f005a78f83a399acfa72 (diff)
downloadfreeipa-fabd5cd62f0693c5071ac60131dff2dfe825bff7.tar.gz
freeipa-fabd5cd62f0693c5071ac60131dff2dfe825bff7.tar.xz
freeipa-fabd5cd62f0693c5071ac60131dff2dfe825bff7.zip
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>
Diffstat (limited to 'daemons/ipa-kdb/ipa_kdb_principals.c')
-rw-r--r--daemons/ipa-kdb/ipa_kdb_principals.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/daemons/ipa-kdb/ipa_kdb_principals.c b/daemons/ipa-kdb/ipa_kdb_principals.c
index d2be98886..5ae6818b6 100644
--- a/daemons/ipa-kdb/ipa_kdb_principals.c
+++ b/daemons/ipa-kdb/ipa_kdb_principals.c
@@ -776,6 +776,9 @@ static krb5_error_code ipadb_find_principal(krb5_context kcontext,
} else {
found = (strcmp(vals[i]->bv_val, (*principal)) == 0);
}
+ if (found) {
+ break;
+ }
}
ldap_value_free_len(vals);