summaryrefslogtreecommitdiffstats
path: root/daemons/ipa-kdb
diff options
context:
space:
mode:
Diffstat (limited to 'daemons/ipa-kdb')
-rw-r--r--daemons/ipa-kdb/ipa_kdb_common.c4
-rw-r--r--daemons/ipa-kdb/ipa_kdb_principals.c6
2 files changed, 10 insertions, 0 deletions
diff --git a/daemons/ipa-kdb/ipa_kdb_common.c b/daemons/ipa-kdb/ipa_kdb_common.c
index 6f5ac1d74..71df9634c 100644
--- a/daemons/ipa-kdb/ipa_kdb_common.c
+++ b/daemons/ipa-kdb/ipa_kdb_common.c
@@ -30,6 +30,10 @@ char *ipadb_filter_escape(const char *input, bool star)
size_t i = 0;
size_t j = 0;
+ if (!input) {
+ return NULL;
+ }
+
/* Assume the worst-case. */
output = malloc(strlen(input) * 3 + 1);
if (!output) {
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) {