From 77a452f4fda2168c5439cc82e6ccc4ac2b1e49dc Mon Sep 17 00:00:00 2001 From: Nicolas Williams Date: Fri, 30 Dec 2022 19:15:16 -0600 Subject: [PATCH] kdc: Make path to MIT Kerberos for testing configurable --- tests/bin/setup-env.in | 1 + tests/kdc/Makefile.am | 4 +++- tests/kdc/check-fast.in | 12 +++++------- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/tests/bin/setup-env.in b/tests/bin/setup-env.in index c9291d08b..8efa0e992 100644 --- a/tests/bin/setup-env.in +++ b/tests/bin/setup-env.in @@ -13,6 +13,7 @@ top_builddir="@top_builddir@" top_srcdir="@top_srcdir@" EGREP="@EGREP@" NO_AFS="@NO_AFS@" +MITKRB5="@MITKRB5@" # Meant to be sourced (source or .) by the tester application, offers # most commands in heimdal as variables diff --git a/tests/kdc/Makefile.am b/tests/kdc/Makefile.am index 53b990847..09f695348 100644 --- a/tests/kdc/Makefile.am +++ b/tests/kdc/Makefile.am @@ -80,7 +80,9 @@ do_subst = $(heim_verbose)sed $(do_dlopen) \ -e 's,[@]db_type[@],$(db_type),g' \ -e 's,[@]max_life_from_cert[@],$(pkinit_ticket_max_life_from_cert),g' \ -e 's,[@]ENABLE_AFS_STRING_TO_KEY[@],$(ENABLE_AFS_STRING_TO_KEY),' \ - -e 's,[@]EGREP[@],$(EGREP),g' + -e 's,[@]ENABLE_AFS_STRING_TO_KEY[@],$(ENABLE_AFS_STRING_TO_KEY),' \ + -e 's,[@]EGREP[@],$(EGREP),g' \ + -e 's,[@]MITKRB5[@],$(MITKRB5),g' chmod = chmod diff --git a/tests/kdc/check-fast.in b/tests/kdc/check-fast.in index 3fbda813a..d1683f2e7 100644 --- a/tests/kdc/check-fast.in +++ b/tests/kdc/check-fast.in @@ -171,9 +171,7 @@ done # Use MIT client tools # -mit=/usr/local/mitkerberos/bin - -if [ -f ${mit}/kinit ] ; then +if [ -n "$MITKRB5" -a -f "${MITKRB5}/kinit" ] ; then echo "Running MIT FAST tests" kinitpty=${objdir}/foopassword.rkpty @@ -183,25 +181,25 @@ password foo\n EOF echo "Acquire host ticket"; > messages.log - ${rkpty} ${kinitpty} ${mit}/kinit -c ${acache} ${server}@${R} >/dev/null|| { exit 1; } + ${rkpty} ${kinitpty} "${MITKRB5}/kinit" -c ${acache} ${server}@${R} >/dev/null|| { exit 1; } (${aklist} | grep ${server} > /dev/null ) || { exit 1; } echo "Checking for FAST avail"; > messages.log ${aklist} --hidden | grep fast_avail > /dev/null || { exit 1; } echo "Using plain to get a initial ticket"; > messages.log - ${rkpty} ${kinitpty} ${mit}/kinit -c ${cache} foo@${R} >/dev/null|| { exit 1; } + ${rkpty} ${kinitpty} "${MITKRB5}/kinit" -c ${cache} foo@${R} >/dev/null|| { exit 1; } (${klist} | grep foo > /dev/null ) || { exit 1; } echo "Using FAST to get a initial ticket"; > messages.log - ${rkpty} ${kinitpty} ${mit}/kinit -c ${cache} -T ${acache} foo@${R} >/dev/null || { exit 1; } + ${rkpty} ${kinitpty} "${MITKRB5}/kinit" -c ${cache} -T ${acache} foo@${R} >/dev/null || { exit 1; } (${klist} | grep foo > /dev/null ) || { exit 1; } echo "Checking for FAST avail"; > messages.log ${klist} --hidden | grep fast_avail > /dev/null || { exit 1; } echo "Getting service ticket"; > messages.log - ${mit}/kvno -c ${cache} ${server}@${R} || { exit 1; } + "${MITKRB5}/kvno" -c ${cache} ${server}@${R} || { exit 1; } fi