svc-labeld revision 269f47de02761bab3b7b28e2007a2bac34f629cc
2N/A# The contents of this file are subject to the terms of the 2N/A# Common Development and Distribution License (the "License"). 2N/A# You may not use this file except in compliance with the License. 2N/A# See the License for the specific language governing permissions 2N/A# and limitations under the License. 2N/A# When distributing Covered Code, include this CDDL HEADER in each 2N/A# If applicable, add the following below this CDDL HEADER, with the 2N/A# fields enclosed by brackets "[]" replaced with your own identifying 2N/A# information: Portions Copyright [yyyy] [name of copyright owner] 2N/A# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. 2N/A if [ $# -
ne 3 -o
"$2" !=
"-R" ];
then 2N/A echo "$0: invalid syntax" 2N/A if [
"$3" !=
"/" ];
then 2N/A echo "$0: invalid syntax: -R allowed for start method only" 2N/A echo "$0: invalid -R rootpath dir specified" 2N/A echo "$0: not supported in a local zone" 2N/A # Comment out audio, usb, removable-media, and hotpluggable device 2N/A # Setup dependent services 2N/A # Ensure auditing and device allocation are enabled by 2N/A # default with Trusted Extensions. 2N/A echo "Starting auditd ..." 2N/A# For Trusted Extensions, make nscd service transient in local zones. 2N/A# No comments or blanks lines allowed in entries below 2N/Adtlogin account requisite pam_roles.so.1 2N/Adtlogin account required pam_unix_account.so.1 2N/Adtsession account requisite pam_roles.so.1 2N/Adtsession account required pam_unix_account.so.1 2N/Agdm account requisite pam_roles.so.1 2N/Agdm account required pam_unix_account.so.1 2N/Axscreensaver account requisite pam_roles.so.1 2N/Axscreensaver account required pam_unix_account.so.1 2N/Apasswd account requisite pam_roles.so.1 2N/Apasswd account required pam_unix_account.so.1 2N/Adtpasswd account requisite pam_roles.so.1 2N/Adtpasswd account required pam_unix_account.so.1 2N/Atsoljds-tstripe account requisite pam_roles.so.1 2N/Atsoljds-tstripe account required pam_unix_account.so.1 2N/Aother account required pam_tsol_account.so.1 2N/A echo "$0: ${PAM_DEST} not found; aborting" 2N/A # Update pam.conf to append Trusted Extensions entries if not 2N/A # If this is the 'other' entry, add it unless it already 2N/A if [ $? = 1 ] ; then 2N/A # Add other entries unless they already have a 2N/A # stack of their own. 2N/A if [ $? = 1 ] ; then 2N/A # Append TX lines if any were not present already. echo "$0: updating $PAM_DEST entries for Trusted Extensions;" echo "$0: ${PAM_DEST} not found; aborting" echo "$0: pam_tsol_account module not present," echo "$0: No changes were made to $PAM_DEST." # Setup dependent services TX_PROD_URN="urn:uuid:fc720df3-410f-11dc-9b8e-080020a9ed93" # if already registered then do nothing more here # this instance id was saved in a SMF property # matching service tag found, so do nothing # no match for instance id saved in SMF property # fall through: no service tag, or does not match saved instance id # determine the urn of the parent (Solaris) SOL_PROD_URN="-F urn:uuid:6df19e63-7ef5-11db-a4bd-080020a9ed93" SOL_PROD_URN="-F urn:uuid:5005588c-36f3-11d6-9cec-fc96f718e113" # save instance id in SMF property # delete saved instance id # If a labeld door exists, check for a labeld process and exit # if the daemon is already running. echo "$0: labeld is already running" echo "$0: this script can only be invoked by smf(5)" echo "$0: Temporarily enabling Trusted Extensions is not allowed." # Make changes to enable Trusted Extensions echo "$0: already enabled. Exiting." echo "$0: Must remove zones before enabling Trusted Extensions." # start daemon proccess so our service doesn't go into echo "$0: Started. Must reboot and configure Trusted Extensions." # Make changes to enable Trusted Extensions echo "$0: already enabled. Exiting." # Setup dependent services echo "$0: Started. Must configure Trusted Extensions before booting." echo "$0: Must remove zones before disabling Trusted Extensions." # Uncomment audio, usb, removable-media, and hotpluggable device echo "$0: Stopped. Will take effect at next boot." echo "Usage: $0 { start | stop }"