Add --with-db-type-preference config param

This commit is contained in:
Nicolas Williams
2015-06-01 15:29:41 -05:00
parent c6f24e99f0
commit a94dc50114
9 changed files with 62 additions and 9 deletions

View File

@@ -58,6 +58,7 @@ do_subst = $(heim_verbose)sed $(do_dlopen) \
-e 's,[@]pwport[@],$(pwport),g' \
-e 's,[@]objdir[@],$(top_builddir)/tests/kdc,g' \
-e 's,[@]top_builddir[@],$(top_builddir),g' \
-e 's,[@]db_type[@],$(db_type),g' \
-e 's,[@]EGREP[@],$(EGREP),g'
chmod = chmod

View File

@@ -35,8 +35,7 @@ top_builddir="@top_builddir@"
env_setup="@env_setup@"
objdir="@objdir@"
default_db_type=@default_db_type@
db_type=${1:-${default_db_type}}
db_type=@db_type@
. ${env_setup}
@@ -175,6 +174,11 @@ sleep 2
KRB5_CONFIG="${objdir}/krb5-slave.conf" \
${kadmin} -l get host/bar@${R} > /dev/null 2>/dev/null && exit 1
# See note below in LMDB sanity checking
echo "Re-add host"
${kadmin} -l add --random-key --use-defaults host/foo@${R} || exit 1
${kadmin} -l add --random-key --use-defaults host/bar@${R} || exit 1
echo "kill slave and remove log and database"
> iprop-stats
sh ${leaks_kill} ipropd-slave $ipds || exit 1
@@ -337,4 +341,14 @@ ${iprop_log} last-version > slave-last.tmp
${iprop_log} last-version > master-last.tmp
cmp master-last.tmp slave-last.tmp || exit 1
if [ "$db_type" = lmdb ]; then
# Sanity check that we have the same number of principals at the HDB
# and LMDB levels.
#
echo "checking that principals in DB == entries in LMDB"
princs=`${kadmin} -l list '*' | wc -l`
entries=`mdb_stat -n current-db.mdb | grep 'Entries:' | awk '{print $2}'`
[ "`expr 1 + "$princs"`" -eq "$entries" ] || exit 1
fi
exit $ec

View File

@@ -72,14 +72,14 @@
database = {
label = {
dbname = @objdir@/current-db@kdc@
dbname = @db_type@:@objdir@/current-db@kdc@
realm = TEST.H5L.SE
mkey_file = @objdir@/mkey.file
acl_file = @srcdir@/heimdal.acl
log_file = @objdir@/current@kdc@.log
}
label2 = {
dbname = @objdir@/current-db@kdc@
dbname = @db_type@:@objdir@/current-db@kdc@
realm = TEST2.H5L.SE
mkey_file = @objdir@/mkey.file
acl_file = @srcdir@/heimdal.acl