diff options
author | Sumit Bose <sbose@redhat.com> | 2012-09-05 14:08:02 +0200 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2012-09-05 14:20:29 +0200 |
commit | 83245bc8c978db4c2fc1ddbbc16264422875d357 (patch) | |
tree | d55f2c9c963d0c9ce474e8c70c8495db8a309c19 /daemons/ipa-kdb/ipa_kdb_principals.c | |
parent | 2ede70b7209c0c85642600a60642887096a96530 (diff) | |
download | freeipa-83245bc8c978db4c2fc1ddbbc16264422875d357.tar.gz freeipa-83245bc8c978db4c2fc1ddbbc16264422875d357.tar.xz freeipa-83245bc8c978db4c2fc1ddbbc16264422875d357.zip |
ipadb_iterate(): handle match_entry == NULL
If match_entry == NULL all principals should be iterated.
Additionally this patch adds a check in ipadb_filter_escape() to make
sure that the input is not NULL.
Fixes: https://fedorahosted.org/freeipa/ticket/3011
Diffstat (limited to 'daemons/ipa-kdb/ipa_kdb_principals.c')
-rw-r--r-- | daemons/ipa-kdb/ipa_kdb_principals.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/daemons/ipa-kdb/ipa_kdb_principals.c b/daemons/ipa-kdb/ipa_kdb_principals.c index 6f8b296fa..621558162 100644 --- a/daemons/ipa-kdb/ipa_kdb_principals.c +++ b/daemons/ipa-kdb/ipa_kdb_principals.c @@ -1879,6 +1879,12 @@ krb5_error_code ipadb_iterate(krb5_context kcontext, return KRB5_KDB_DBNOTINITED; } + /* If no match_entry is given iterate through all krb princs like the db2 + * or ldap plugin */ + if (match_entry == NULL) { + match_entry = "*"; + } + /* fetch list of principal matching filter */ kerr = ipadb_fetch_principals(ipactx, 0, match_entry, &res); if (kerr != 0) { |