f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica#!/sbin/sh
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica#
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica# CDDL HEADER START
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica#
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica# The contents of this file are subject to the terms of the
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica# Common Development and Distribution License (the "License").
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica# You may not use this file except in compliance with the License.
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica#
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica# or http://www.opensolaris.org/os/licensing.
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica# See the License for the specific language governing permissions
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica# and limitations under the License.
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica#
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica# When distributing Covered Code, include this CDDL HEADER in each
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica# If applicable, add the following below this CDDL HEADER, with the
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica# fields enclosed by brackets "[]" replaced with your own identifying
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica# information: Portions Copyright [yyyy] [name of copyright owner]
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica#
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica# CDDL HEADER END
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica#
269f47de02761bab3b7b28e2007a2bac34f629ccThuy Fettig# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica#
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica. /lib/svc/share/smf_include.sh
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01ricaROOT_PATH=""
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01ricaif [ $# -gt 1 ]; then
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica if [ $# -ne 3 -o "$2" != "-R" ]; then
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica echo "$0: invalid syntax"
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica exit $SMF_EXIT_ERR_CONFIG
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica fi
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica if [ "$3" != "/" ]; then
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica ROOT_PATH=$3
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica fi
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01ricafi
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01ricaif [ -n "$ROOT_PATH" -a "$1" != "start" ]; then
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica echo "$0: invalid syntax: -R allowed for start method only"
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica exit $SMF_EXIT_ERR_CONFIG
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01ricafi
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01ricaif [ -n "$ROOT_PATH" -a ! -d "$ROOT_PATH" ]; then
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica echo "$0: invalid -R rootpath dir specified"
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica exit $SMF_EXIT_ERR_CONFIG
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01ricafi
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01ricaif smf_is_nonglobalzone; then
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica echo "$0: not supported in a local zone"
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica exit $SMF_EXIT_ERR_CONFIG
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01ricafi
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica
583b61f62d9b9c5ac6bbc290b4e91263dfb202b4ajrewrite_logindev()
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica{
583b61f62d9b9c5ac6bbc290b4e91263dfb202b4aj from="$1"
583b61f62d9b9c5ac6bbc290b4e91263dfb202b4aj to="$2"
583b61f62d9b9c5ac6bbc290b4e91263dfb202b4aj # Comment out audio, usb, removable-media, and hotpluggable device
583b61f62d9b9c5ac6bbc290b4e91263dfb202b4aj # entries in /etc/logindevperm.
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica LOGINDEVPERM=$ROOT_PATH/etc/logindevperm
583b61f62d9b9c5ac6bbc290b4e91263dfb202b4aj if [ ! -f $LOGINDEVPERM ]; then
583b61f62d9b9c5ac6bbc290b4e91263dfb202b4aj return
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica fi
583b61f62d9b9c5ac6bbc290b4e91263dfb202b4aj for line in \
36d41b68ce4ecc38f01ced5fe21dddf05a5f9289Nathan Bush "/dev/sound/" \
36d41b68ce4ecc38f01ced5fe21dddf05a5f9289Nathan Bush "/dev/removable-media/" \
36d41b68ce4ecc38f01ced5fe21dddf05a5f9289Nathan Bush "/dev/hotpluggable/" \
36d41b68ce4ecc38f01ced5fe21dddf05a5f9289Nathan Bush "/dev/usb/\[0-9a-f\]" \
583b61f62d9b9c5ac6bbc290b4e91263dfb202b4aj ; do
36d41b68ce4ecc38f01ced5fe21dddf05a5f9289Nathan Bush sed -e "s!^$from\([^# ]\{1,\}[ }\{1,\}[0-9]\{1,\}[ ]\{1,\}\)$line!$to\1$line!" \
36d41b68ce4ecc38f01ced5fe21dddf05a5f9289Nathan Bush $LOGINDEVPERM > /tmp/tmp.$$
583b61f62d9b9c5ac6bbc290b4e91263dfb202b4aj cp /tmp/tmp.$$ $LOGINDEVPERM
583b61f62d9b9c5ac6bbc290b4e91263dfb202b4aj done
583b61f62d9b9c5ac6bbc290b4e91263dfb202b4aj rm -f /tmp/tmp.$$
583b61f62d9b9c5ac6bbc290b4e91263dfb202b4aj}
583b61f62d9b9c5ac6bbc290b4e91263dfb202b4aj
583b61f62d9b9c5ac6bbc290b4e91263dfb202b4ajdo_logindev()
583b61f62d9b9c5ac6bbc290b4e91263dfb202b4aj{
583b61f62d9b9c5ac6bbc290b4e91263dfb202b4aj rewrite_logindev "" "#"
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica}
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01ricado_otherservices()
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica{
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica # Setup dependent services
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica cat >> $ROOT_PATH/var/svc/profile/upgrade <<\__ENABLE_OTHERS
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica /usr/sbin/svcadm enable -s svc:/network/tnd:default
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica /usr/sbin/svcadm enable -s svc:/system/tsol-zones:default
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica /usr/sbin/svcadm enable svc:/network/rpc/rstat:default
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica__ENABLE_OTHERS
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica}
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica
269f47de02761bab3b7b28e2007a2bac34f629ccThuy Fettigdo_audit_devalloc()
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica{
269f47de02761bab3b7b28e2007a2bac34f629ccThuy Fettig # Ensure auditing and device allocation are enabled by
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica # default with Trusted Extensions.
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica if [ "$ROOT_PATH" = "/" -o "$ROOT_PATH" = "" ]; then
269f47de02761bab3b7b28e2007a2bac34f629ccThuy Fettig /usr/sbin/svcadm enable -s svc:/system/device/allocate:default
005d3feb53a9a10272d4a24b03991575d6a9bcb3Marek Pospisil echo "Starting auditd ..."
005d3feb53a9a10272d4a24b03991575d6a9bcb3Marek Pospisil /usr/sbin/audit -s
005d3feb53a9a10272d4a24b03991575d6a9bcb3Marek Pospisil else
005d3feb53a9a10272d4a24b03991575d6a9bcb3Marek Pospisil cat >> $ROOT_PATH/var/svc/profile/upgrade <<\_ENABLE_AUDITD
005d3feb53a9a10272d4a24b03991575d6a9bcb3Marek Pospisil /usr/sbin/audit -s
269f47de02761bab3b7b28e2007a2bac34f629ccThuy Fettig /usr/sbin/svcadm enable -s svc:/system/device/allocate:default
005d3feb53a9a10272d4a24b03991575d6a9bcb3Marek Pospisil_ENABLE_AUDITD
005d3feb53a9a10272d4a24b03991575d6a9bcb3Marek Pospisil fi
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica}
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01ricado_nscd()
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica{
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica# For Trusted Extensions, make nscd service transient in local zones.
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01ricacat >> $ROOT_PATH/var/svc/profile/upgrade <<\_DEL_LOCAL_NSCD
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica if [ `/sbin/zonename` != "global" ]; then
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica nscd="svc:/system/name-service-cache"
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica duration=""
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica if /bin/svcprop -q -c -p startd/duration $nscd ; then
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica duration=`/bin/svcprop -c -p startd/duration $nscd`
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica fi
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica if [ "$duration" != "transient" ]; then
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica /usr/sbin/svccfg -s $nscd addpg startd framework
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica /usr/sbin/svccfg -s $nscd setprop \
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica startd/duration = astring: transient
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica /usr/sbin/svccfg -s $nscd setprop stop/exec = :true
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica /usr/sbin/svcadm refresh $nscd
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica fi
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica fi
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica_DEL_LOCAL_NSCD
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica}
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01ricado_bootupd()
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica{
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica if [ -f $ROOT_PATH/platform/`/sbin/uname -m`/boot_archive ]; then
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica if [ -z "$ROOT_PATH" -o "$ROOT_PATH" = "/" ]; then
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica /sbin/bootadm update-archive
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica else
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica /sbin/bootadm update-archive -R $ROOT_PATH
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica fi
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica fi
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica}
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica
8700009e2cc8cb186241e1fdd74973da1121ee4cricasetup_tx_changes(){
8700009e2cc8cb186241e1fdd74973da1121ee4crica#
8700009e2cc8cb186241e1fdd74973da1121ee4crica# No comments or blanks lines allowed in entries below
8700009e2cc8cb186241e1fdd74973da1121ee4crica#
8700009e2cc8cb186241e1fdd74973da1121ee4cricacat > ${TX_ENTRIES} << EOF
8700009e2cc8cb186241e1fdd74973da1121ee4cricadtlogin account requisite pam_roles.so.1
8700009e2cc8cb186241e1fdd74973da1121ee4cricadtlogin account required pam_unix_account.so.1
8700009e2cc8cb186241e1fdd74973da1121ee4cricadtsession account requisite pam_roles.so.1
8700009e2cc8cb186241e1fdd74973da1121ee4cricadtsession account required pam_unix_account.so.1
8700009e2cc8cb186241e1fdd74973da1121ee4cricagdm account requisite pam_roles.so.1
8700009e2cc8cb186241e1fdd74973da1121ee4cricagdm account required pam_unix_account.so.1
8700009e2cc8cb186241e1fdd74973da1121ee4cricaxscreensaver account requisite pam_roles.so.1
8700009e2cc8cb186241e1fdd74973da1121ee4cricaxscreensaver account required pam_unix_account.so.1
8700009e2cc8cb186241e1fdd74973da1121ee4cricapasswd account requisite pam_roles.so.1
8700009e2cc8cb186241e1fdd74973da1121ee4cricapasswd account required pam_unix_account.so.1
8700009e2cc8cb186241e1fdd74973da1121ee4cricadtpasswd account requisite pam_roles.so.1
8700009e2cc8cb186241e1fdd74973da1121ee4cricadtpasswd account required pam_unix_account.so.1
c64380fd28a9c6885abd420225a75a57e46f6b75ricatsoljds-tstripe account requisite pam_roles.so.1
c64380fd28a9c6885abd420225a75a57e46f6b75ricatsoljds-tstripe account required pam_unix_account.so.1
8700009e2cc8cb186241e1fdd74973da1121ee4cricaother account required pam_tsol_account.so.1
8700009e2cc8cb186241e1fdd74973da1121ee4cricaEOF
8700009e2cc8cb186241e1fdd74973da1121ee4crica}
8700009e2cc8cb186241e1fdd74973da1121ee4crica
8700009e2cc8cb186241e1fdd74973da1121ee4cricado_addpam()
8700009e2cc8cb186241e1fdd74973da1121ee4crica{
8700009e2cc8cb186241e1fdd74973da1121ee4crica PAM_TMP=/tmp/pam_conf.$$
8700009e2cc8cb186241e1fdd74973da1121ee4crica TX_ENTRIES=$PAM_TMP/sct.$$
8700009e2cc8cb186241e1fdd74973da1121ee4crica PAM_DEST=$ROOT_PATH/etc/pam.conf
8700009e2cc8cb186241e1fdd74973da1121ee4crica
8700009e2cc8cb186241e1fdd74973da1121ee4crica mkdir $PAM_TMP || exit $SMF_EXIT_ERR_FATAL
8700009e2cc8cb186241e1fdd74973da1121ee4crica setup_tx_changes
8700009e2cc8cb186241e1fdd74973da1121ee4crica
8700009e2cc8cb186241e1fdd74973da1121ee4crica # verify that pam.conf file exists...
8700009e2cc8cb186241e1fdd74973da1121ee4crica if [ ! -f ${PAM_DEST} ]; then
8700009e2cc8cb186241e1fdd74973da1121ee4crica echo "$0: ${PAM_DEST} not found; aborting"
8700009e2cc8cb186241e1fdd74973da1121ee4crica exit $SMF_EXIT_ERR_FATAL
8700009e2cc8cb186241e1fdd74973da1121ee4crica fi
8700009e2cc8cb186241e1fdd74973da1121ee4crica
8700009e2cc8cb186241e1fdd74973da1121ee4crica #
8700009e2cc8cb186241e1fdd74973da1121ee4crica # Update pam.conf to append Trusted Extensions entries if not
8700009e2cc8cb186241e1fdd74973da1121ee4crica # already present.
8700009e2cc8cb186241e1fdd74973da1121ee4crica #
8700009e2cc8cb186241e1fdd74973da1121ee4crica rm -f /tmp/pamconf.$$
8700009e2cc8cb186241e1fdd74973da1121ee4crica while read e1 e2 e3 e4 e5
8700009e2cc8cb186241e1fdd74973da1121ee4crica do
8700009e2cc8cb186241e1fdd74973da1121ee4crica # If this is the 'other' entry, add it unless it already
8700009e2cc8cb186241e1fdd74973da1121ee4crica # exists.
8700009e2cc8cb186241e1fdd74973da1121ee4crica if [ $e1 = "other" ]; then
8700009e2cc8cb186241e1fdd74973da1121ee4crica grep \
8700009e2cc8cb186241e1fdd74973da1121ee4crica"^[# ]*$e1[ ][ ]*$e2[ ][ ]*$e3[ ][ ]*$e4" \
8700009e2cc8cb186241e1fdd74973da1121ee4crica $PAM_DEST >/dev/null 2>&1
8700009e2cc8cb186241e1fdd74973da1121ee4crica if [ $? = 1 ] ; then
8700009e2cc8cb186241e1fdd74973da1121ee4crica # Doesn't exist, enter into pam.conf
8700009e2cc8cb186241e1fdd74973da1121ee4crica echo "$e1\t$e2 $e3\t\t$e4 $e5" \
8700009e2cc8cb186241e1fdd74973da1121ee4crica >> /tmp/pamconf.$$
8700009e2cc8cb186241e1fdd74973da1121ee4crica fi
8700009e2cc8cb186241e1fdd74973da1121ee4crica else
8700009e2cc8cb186241e1fdd74973da1121ee4crica # Add other entries unless they already have a
8700009e2cc8cb186241e1fdd74973da1121ee4crica # stack of their own.
8700009e2cc8cb186241e1fdd74973da1121ee4crica grep "^[# ]*$e1[ ][ ]*$e2[ ]" \
8700009e2cc8cb186241e1fdd74973da1121ee4crica $PAM_DEST >/dev/null 2>&1
8700009e2cc8cb186241e1fdd74973da1121ee4crica if [ $? = 1 ] ; then
8700009e2cc8cb186241e1fdd74973da1121ee4crica echo "$e1\t$e2 $e3\t\t$e4 $e5" \
8700009e2cc8cb186241e1fdd74973da1121ee4crica >> /tmp/pamconf.$$
8700009e2cc8cb186241e1fdd74973da1121ee4crica fi
8700009e2cc8cb186241e1fdd74973da1121ee4crica fi
8700009e2cc8cb186241e1fdd74973da1121ee4crica done < ${TX_ENTRIES}
8700009e2cc8cb186241e1fdd74973da1121ee4crica # Append TX lines if any were not present already.
8700009e2cc8cb186241e1fdd74973da1121ee4crica if [ -f /tmp/pamconf.$$ ] ; then
8700009e2cc8cb186241e1fdd74973da1121ee4crica echo "# Entries for Trusted Extensions" >> $PAM_DEST
8700009e2cc8cb186241e1fdd74973da1121ee4crica cat /tmp/pamconf.$$ >> $PAM_DEST
8700009e2cc8cb186241e1fdd74973da1121ee4crica echo "$0: updating $PAM_DEST entries for Trusted Extensions;"
8700009e2cc8cb186241e1fdd74973da1121ee4crica echo "$0: please examine/update any new entries"
8700009e2cc8cb186241e1fdd74973da1121ee4crica rm -f /tmp/pamconf.$$
8700009e2cc8cb186241e1fdd74973da1121ee4crica fi
8700009e2cc8cb186241e1fdd74973da1121ee4crica
8700009e2cc8cb186241e1fdd74973da1121ee4crica rm -rf $PAM_TMP
8700009e2cc8cb186241e1fdd74973da1121ee4crica}
8700009e2cc8cb186241e1fdd74973da1121ee4crica
8700009e2cc8cb186241e1fdd74973da1121ee4cricado_pamremove()
8700009e2cc8cb186241e1fdd74973da1121ee4crica{
8700009e2cc8cb186241e1fdd74973da1121ee4crica PAM_TMP=/tmp/pam_conf.$$
8700009e2cc8cb186241e1fdd74973da1121ee4crica TX_ENTRIES=$PAM_TMP/sct.$$
8700009e2cc8cb186241e1fdd74973da1121ee4crica PAM_DEST=$ROOT_PATH/etc/pam.conf
8700009e2cc8cb186241e1fdd74973da1121ee4crica TMPFILE=$PAM_TMP/pam.conf
8700009e2cc8cb186241e1fdd74973da1121ee4crica
8700009e2cc8cb186241e1fdd74973da1121ee4crica mkdir $PAM_TMP || exit $SMF_EXIT_ERR_FATAL
8700009e2cc8cb186241e1fdd74973da1121ee4crica
8700009e2cc8cb186241e1fdd74973da1121ee4crica # verify that pam.conf file exists...
8700009e2cc8cb186241e1fdd74973da1121ee4crica if [ ! -f ${PAM_DEST} ]; then
8700009e2cc8cb186241e1fdd74973da1121ee4crica echo "$0: ${PAM_DEST} not found; aborting"
8700009e2cc8cb186241e1fdd74973da1121ee4crica exit $SMF_EXIT_ERR_FATAL
8700009e2cc8cb186241e1fdd74973da1121ee4crica fi
8700009e2cc8cb186241e1fdd74973da1121ee4crica
8700009e2cc8cb186241e1fdd74973da1121ee4crica
8700009e2cc8cb186241e1fdd74973da1121ee4crica grep '^[a-z].*pam_tsol_account' $PAM_DEST > /dev/null 2>&1
8700009e2cc8cb186241e1fdd74973da1121ee4crica if [ $? -ne 0 ]; then
8700009e2cc8cb186241e1fdd74973da1121ee4crica echo "$0: pam_tsol_account module not present,"
8700009e2cc8cb186241e1fdd74973da1121ee4crica echo "$0: No changes were made to $PAM_DEST."
8700009e2cc8cb186241e1fdd74973da1121ee4crica return
8700009e2cc8cb186241e1fdd74973da1121ee4crica fi
8700009e2cc8cb186241e1fdd74973da1121ee4crica
8700009e2cc8cb186241e1fdd74973da1121ee4crica grep -v pam_tsol_account $PAM_DEST > $TMPFILE
8700009e2cc8cb186241e1fdd74973da1121ee4crica echo "$0: $PAM_DEST "tsol" entries removed"
8700009e2cc8cb186241e1fdd74973da1121ee4crica cp $TMPFILE $PAM_DEST
8700009e2cc8cb186241e1fdd74973da1121ee4crica
8700009e2cc8cb186241e1fdd74973da1121ee4crica rm -rf $PAM_TMP
8700009e2cc8cb186241e1fdd74973da1121ee4crica}
8700009e2cc8cb186241e1fdd74973da1121ee4crica
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01ricado_commonstart()
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica{
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica echo "$0: Updating $ROOT_PATH/etc/system..."
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica if [ ! -f ${ROOT_PATH}/etc/system ]; then
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica touch ${ROOT_PATH}/etc/system
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica fi
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica # Set sys_labeling in etc/system
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica grep -v "sys_labeling=" ${ROOT_PATH}/etc/system > /tmp/etc.system.$$
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica echo "set sys_labeling=1" >> /tmp/etc.system.$$
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica mv /tmp/etc.system.$$ ${ROOT_PATH}/etc/system
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica grep "set sys_labeling=1" ${ROOT_PATH}/etc/system > /dev/null 2>&1
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica if [ $? -ne 0 ]; then
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica echo "$0: ERROR: cannot set sys_labeling in $ROOT_PATH/etc/system"
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica exit $SMF_EXIT_ERR_FATAL
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica fi
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica # Setup dependent services
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica do_otherservices
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica do_logindev
269f47de02761bab3b7b28e2007a2bac34f629ccThuy Fettig do_audit_devalloc
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica do_nscd
8700009e2cc8cb186241e1fdd74973da1121ee4crica do_addpam
8700009e2cc8cb186241e1fdd74973da1121ee4crica
8700009e2cc8cb186241e1fdd74973da1121ee4crica do_bootupd
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica}
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpkdo_servicetag_register()
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk{
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk ROOTDIR=$1
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk SOL_ARCH=`/sbin/uname -p`
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk SOL_VERS=`/sbin/uname -r`
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk TX_PROD_URN="urn:uuid:fc720df3-410f-11dc-9b8e-080020a9ed93"
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk if [ ! -x /usr/bin/stclient ]; then
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk return
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk fi
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk # if already registered then do nothing more here
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk inst=`/usr/bin/svcprop -p labeld/svctag_inst $SMF_FMRI 2>/dev/null`
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk if [ -n "$inst" ]; then
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk # this instance id was saved in a SMF property
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk /usr/bin/stclient -g -i $inst -r $ROOTDIR >/dev/null 2>&1
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk if [ $? = 0 ]; then
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk # matching service tag found, so do nothing
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk return
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk else
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk # no match for instance id saved in SMF property
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk /usr/sbin/svccfg -s $SMF_FMRI delprop \
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk labeld/svctag_inst
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk /usr/sbin/svcadm refresh $SMF_FMRI
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk fi
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk fi
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk # fall through: no service tag, or does not match saved instance id
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk # determine the urn of the parent (Solaris)
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk SOL_PROD_URN=""
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk case $SOL_VERS in
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk 5.11)
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk SOL_PROD_URN="-F urn:uuid:6df19e63-7ef5-11db-a4bd-080020a9ed93"
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk ;;
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk 5.10)
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk SOL_PROD_URN="-F urn:uuid:5005588c-36f3-11d6-9cec-fc96f718e113"
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk ;;
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk esac
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk # add the service tag
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk RC=`/usr/bin/stclient -a -p "Solaris Trusted Extensions" \
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk -e $SOL_VERS -t $TX_PROD_URN -P Solaris $SOL_PROD_URN \
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk -m Sun -A $SOL_ARCH -z global -S $0 -r $ROOTDIR`
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk if [ $? = 0 ]; then
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk # save instance id in SMF property
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk inst=`echo "$RC" | grep -i urn|awk -F= '{print $2}'`
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk /usr/sbin/svccfg -s $SMF_FMRI setprop \
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk labeld/svctag_inst = astring: "$inst"
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk /usr/sbin/svcadm refresh $SMF_FMRI
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk fi
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk}
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpkdo_servicetag_delete()
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk{
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk if [ ! -x /usr/bin/stclient ]; then
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk return
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk fi
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk inst=`/usr/bin/svcprop -p labeld/svctag_inst $SMF_FMRI 2>/dev/null`
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk if [ -n "$inst" ]; then
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk # delete service tag
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk /usr/bin/stclient -d -i $inst
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk # delete saved instance id
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk /usr/sbin/svccfg -s $SMF_FMRI delprop labeld/svctag_inst
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk /usr/sbin/svcadm refresh $SMF_FMRI
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk fi
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk}
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01ricadaemon_start()
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica{
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica # If a labeld door exists, check for a labeld process and exit
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica # if the daemon is already running.
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica if [ -r /var/tsol/doors/labeld ]; then
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica if /usr/bin/pgrep -x -u 0 -P 1 labeld >/dev/null 2>&1; then
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica echo "$0: labeld is already running"
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica exit $SMF_EXIT_ERR_FATAL
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica fi
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica fi
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica /usr/bin/rm -f /var/tsol/doors/labeld
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica /usr/lib/labeld
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica}
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01ricaPATH=/usr/sbin:/usr/bin; export PATH
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01ricacase "$1" in
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica'start')
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica if [ -z "$ROOT_PATH" -o "$ROOT_PATH" = "/" ]; then
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica # native
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica if [ -z "$SMF_FMRI" ]; then
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica echo "$0: this script can only be invoked by smf(5)"
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica exit $SMF_EXIT_ERR_NOSMF
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica fi
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica tx_enabled=`/usr/bin/svcprop -c -p general/enabled $SMF_FMRI`
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica if [ "$tx_enabled" = "false" ]; then
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica # A sign of trying temporary enablement...no-no
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica echo "$0: Temporarily enabling Trusted Extensions is not allowed."
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica exit $SMF_EXIT_ERR_CONFIG
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica fi
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica if (smf_is_system_labeled); then
15a2c75300554c829663ead6bc3489d86c83cde2jpk do_servicetag_register /
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica daemon_start
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica exit $SMF_EXIT_OK
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica fi
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica # Make changes to enable Trusted Extensions
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica grep "^set sys_labeling=1" ${ROOT_PATH}/etc/system > /dev/null 2>&1
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica if [ $? -eq 0 ]; then
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica echo "$0: already enabled. Exiting."
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica exit $SMF_EXIT_OK
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica fi
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica if [ "`/usr/sbin/zoneadm list -c`" != "global" ]; then
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica echo "$0: Must remove zones before enabling Trusted Extensions."
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica exit $SMF_EXIT_ERR_CONFIG
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica fi
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica do_commonstart
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk do_servicetag_register /
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica # start daemon proccess so our service doesn't go into
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica # maintenance state
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica daemon_start
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica echo "$0: Started. Must reboot and configure Trusted Extensions."
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica else
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica # Support jumpstart etc
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica # Make changes to enable Trusted Extensions
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica grep "^set sys_labeling=1" ${ROOT_PATH}/etc/system > /dev/null 2>&1
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica if [ $? -eq 0 ]; then
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica echo "$0: already enabled. Exiting."
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica exit $SMF_EXIT_OK
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica fi
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica # Setup dependent services
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica cat >> $ROOT_PATH/var/svc/profile/upgrade <<\__TRUSTED_ENABLE
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica /usr/sbin/svcadm enable -s svc:/system/labeld:default
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica__TRUSTED_ENABLE
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica do_commonstart
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk do_servicetag_register $ROOT_PATH
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica echo "$0: Started. Must configure Trusted Extensions before booting."
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica fi
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica ;;
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica'stop')
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica tx_enabled=`/usr/bin/svcprop -c -p general/enabled $SMF_FMRI`
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica if [ "$tx_enabled" = "true" ]; then
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica /usr/bin/pkill -x -u 0 -P 1 -z `smf_zonename` labeld
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica exit $SMF_EXIT_OK
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica fi
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica if [ "`/usr/sbin/zoneadm list -c`" != "global" ]; then
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica echo "$0: Must remove zones before disabling Trusted Extensions."
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica exit $SMF_EXIT_ERR_CONFIG
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica fi
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica # Stop Trusted services.
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica /usr/sbin/svcadm disable svc:/system/tsol-zones:default 2>/dev/null
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica /usr/sbin/svcadm disable svc:/network/tnd:default 2>/dev/null
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica
583b61f62d9b9c5ac6bbc290b4e91263dfb202b4aj # Uncomment audio, usb, removable-media, and hotpluggable device
583b61f62d9b9c5ac6bbc290b4e91263dfb202b4aj # entries in /etc/logindevperm.
583b61f62d9b9c5ac6bbc290b4e91263dfb202b4aj rewrite_logindev "#" ""
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica # Remove sys_labeling from /etc/system
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica grep -v "sys_labeling" ${ROOT_PATH}/etc/system > /tmp/etc.system.$$
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica mv /tmp/etc.system.$$ ${ROOT_PATH}/etc/system
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica grep "sys_labeling" ${ROOT_PATH}/etc/system > /dev/null 2>&1
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica if [ $? -eq 0 ]; then
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica echo "$0: ERROR: cannot remove sys_labeling in $ROOT_PATH/etc/system"
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica exit $SMF_EXIT_ERR_FATAL
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica fi
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica
8700009e2cc8cb186241e1fdd74973da1121ee4crica do_pamremove
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk do_servicetag_delete
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica do_bootupd
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica /usr/bin/pkill -x -u 0 -P 1 -z `smf_zonename` labeld
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica echo "$0: Stopped. Will take effect at next boot."
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica ;;
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica*)
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica echo "Usage: $0 { start | stop }"
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica exit 1
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica ;;
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01ricaesac
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01ricaexit $SMF_EXIT_OK
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica
e9958a6c9e7427ed38c0957f2c72bde3068b0f3bjpk