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