Skip MIT setup if krb5kdc not installed

This commit is contained in:
Ryan Tandy 2020-04-26 11:08:39 -07:00 committed by Quanah Gibson-Mount
parent 4a50fa745d
commit 0578202a26

View file

@ -32,10 +32,8 @@ PATH=${PATH}:/usr/lib/heimdal-servers:/usr/sbin:/usr/local/sbin
echo "Trying Heimdal KDC..."
kdc --version 2>&1 | grep Heimdal > $KDCLOG 2>&1
RC=$?
if test $RC = 0 ; then
command -v kdc >/dev/null 2>&1
if test $? = 0 ; then
kstash --random-key > $KDCLOG 2>&1
RC=$?
if test $RC != 0 ; then
@ -83,6 +81,12 @@ if test $RC = 0 ; then
else
echo "Trying MIT KDC..."
command -v krb5kdc >/dev/null 2>&1
if test $? != 0; then
echo "No KDC available, skipping GSSAPI tests"
exit 0
fi
kdb5_util create -r $KRB5REALM -s -P password > $KDCLOG 2>&1
RC=$?
if test $RC != 0 ; then