From afe2c2095973be9ae22c12bb5ed79f52effb9df5 Mon Sep 17 00:00:00 2001 From: Will Fiveash Date: Mon, 23 Oct 2006 21:36:46 +0000 Subject: fix krb5_ldap_iterate to handle NULL match_expr and open_db_and_mkey to use KRB5_KDB_SRV_TYPE_ADMIN When I ran kdb5_util dump I had two initial problems. First, the LDAP plugin was not finding the bind DN because open_db_and_mkey() was passing KRB5_KDB_SRV_TYPE_OTHER to krb5_db_open(). When I change this to KRB5_KDB_SRV_TYPE_ADMIN then the ldap_kadmind_dn parameter is used from krb5.conf and a valid bind DN is found. Second, krb5_ldap_iterate() will core dump when it is called withy a NULL match_expr arg. This is how dump_db calls krb5_db_iterate(). I updated krb5_ldap_iterate() to use a default_match_expr of "*" if match_expr == NULL. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18736 dc483132-0cff-0310-8789-dd5450dbe970 --- src/kadmin/dbutil/kdb5_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/kadmin') diff --git a/src/kadmin/dbutil/kdb5_util.c b/src/kadmin/dbutil/kdb5_util.c index e60e9929c..1807d1ad0 100644 --- a/src/kadmin/dbutil/kdb5_util.c +++ b/src/kadmin/dbutil/kdb5_util.c @@ -378,7 +378,7 @@ static int open_db_and_mkey() valid_master_key = 0; if ((retval = krb5_db_open(util_context, db5util_db_args, - KRB5_KDB_OPEN_RW | KRB5_KDB_SRV_TYPE_OTHER))) { + KRB5_KDB_OPEN_RW | KRB5_KDB_SRV_TYPE_ADMIN))) { com_err(progname, retval, "while initializing database"); exit_status++; return(1); -- cgit