#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
#
# Run this command as root to set up for sasl testsuite
# creates a standard set of sasl users and makes them principals
# -- create a sasldb
export THIRTYTWO
i386)
THIRTYTWO="i86"
;;
;;
*) echo "Architecture unknown"
exit 1
;;
esac
# realm used as default, edit if a different realm is desired.
export realm="SASLTEST.NET"
# realm for cross-realm auth.
# password for all principals not added to keytab
export passwd="1234"
# Set this to the ID that is allowed to run kadmin
# used to determine if in
# batch/non-intera/home/willf/app_support/etc/krb5/templates/db2ctive mode
force='false'
check_leaks='false'
# keytab config file
set -A kt_transfer_command
# should be null if seting up master kdc
# get the base script name
function usage {
cat >&2 <<EOF
-f: Force answer yes (non-interactive mode). Use with caution as
this script will delete existing KDB.
-?: This help message.
EOF
exit 1
}
function ask {
trap - ERR
# ask question, set global answer
typeset question=$1 default_answer=$2
print "$question \c"
else
print "$question [$default_answer]: \c"
fi
read answer
}
function yesno {
trap - ERR
typeset question="$1"
# answer is a global set by ask
*) answer=;;
esac
done
}
function ok_to_proceed {
trap - ERR
yesno "$@"
echo "Exiting, no action performed"
exit 1
fi
}
################################ Start of Main script #########################
while getopts f flag
do
f) force=true ;;
\?) usage ;;
*) usage ;;
esac
done
if [ -n "$1" ] ; then
echo "'$1'" = $1
fi
if [[ -f .setup ]]
then
exit 0
fi
then
exit 1
fi
# Check for the testsuites we need
then
print -u2 \
"Error: testsuite and $THIRTYTWO/testsuite must be in the local \
directory, Aborting..."
exit 1
fi
export MYLOC=`pwd`
(cd /etc/sasl2 && ln -s $MYLOC/TestSuite.conf . )
else
print -u2 "Please rename /etc/sasl2/TestSuite.conf and try again"
exit 1
fi
if [[ ! -f /etc/resolv.conf ]]
then
print -u2 "Error: need to configure /etc/resolv.conf."
exit 1
fi
if [[ -n "$fqdn" ]]
then
else
fi
then
then
fi
then
print -u2 "Error: ping full hostname ${fqdn} failed. Aborting..."
exit 1
fi
# get time and DNS running
then
fi
then
fi
export KMODE="mit"
"solaris" ) # old kerberos configured
KMODE="seam"
;;
*) # "MIT" or mediator does not exist
KMODE="mit"
;;
esac
if (( $? != 0 ))
then
print -u2 "Setup failed"
exit 1
fi