svc-kdc revision 7c478bd95313f5f23a4c958a745db2134aa03244
#!/bin/sh
#
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#ident "%Z%%M% %I% %E% SMI"
. /lib/svc/share/smf_include.sh
. /lib/svc/share/krb_include.sh
# Start processes required for KDC
if [ -s $KDC_CONF_DIR/kdc.conf ]; then
#make sure kdc.conf is configured
#note: the following regex has spaces and a tab
egrep -l '^[ ]*_[_]*default_realm_' \
$KDC_CONF_DIR/kdc.conf > /dev/null 2>&1
if [ $? -eq 0 ]; then
echo "Invalid configuration in $KDC_CONF_DIR/kdc.conf file"
exit $SMF_EXIT_ERR_CONFIG
fi
if [ ! db_exists ]; then
echo "/var/krb5/principal database does not exist"
exit $SMF_EXIT_ERR_CONFIG
fi
if [ ! -x $BINDIR/krb5kdc ]; then
echo "$BINDIR/krb5kdc is not an executable"
exit $SMF_EXIT_ERR_CONFIG
fi
ppriv -e -s EIP-proc_exec $BINDIR/krb5kdc
exit $SMF_EXIT_OK
else
echo "$KDC_CONF_DIR/kdc.conf does not exist or is invalid"
exit $SMF_EXIT_ERR_CONFIG
fi