#
# .profile	-- Commands executed at login for Restricted Bourne shell users
#
#	@(#) profile 22.1 90/03/12 
#
# Copyright (c) 1989, 1990, The Santa Cruz Operation, Inc.
# All rights reserved.
#
# This Module contains Proprietary Information of the Santa Cruz
# Operation, Inc., and should be treated as Confidential. 
#
#	The Restricted Bourne Shell is identical to the Standard
#	Bourne Shell except that the user may _not_:
#	  (1)  cd,
#	  (2)  Set PATH,
#	  (3)  Use command names containing slashs ("/"), and
#	  (4)  Re-direct output with either ">" or ">>".
#	Any shell script, however, is run by the unrestricted Bourne
#	Shell -- which means that the user should not have both write
#	and execute permission for any directory listed in PATH.
#
#		NOTE TO THE SYSTEM ADMINISTRATOR
#		--------------------------------
# Each Restricted Bourne Shell user should have a customized version
# of this script installed in their home directory as ".profile".
# The required customizations depend on the what the user is allowed
# to do (or should be prevented from doing).  Typically, the user's
# private $HOME/bin should contain only the commands the user is
# allowed to execute, and the PATH environment variable should be
# set to _only_ search the user's $HOME/bin directory.  Futhermore,
# the user's current working directory should be changed to be some
# directory _other_ than their home, and the user should not have
# both write and execute permissions in that directory.
#
#	Please examine, edit, and test each user's customized
#	copy of this script before allowing that user to log
#	onto the system.
#
# CAUTION - When this script is executed at login time,
#	the restrictions of the Restricted Bourne shell
#	are not yet in effect.  The restrictions start
#	to apply as soon as this script is done executing.
#	(If the user tries to interrupt this script while
#	it is executing, the Restricted Bourne Shell exits.)
#
# The following setting of PATH applies _only_ for the duration
# of this script; the user's PATH is set at the very end (below).
#
PATH=/bin:/usr/bin
export PATH

#
# SHELL	-- What shell program a command's shell escape is to run
#
#	If the user is allowed to run a program which has a shell escape,
#	pray and hope that that program respects the SHELL environment
#	variable -- otherwise, via the shell escape, the user can run
#	the unrestricted Bourne Shell.
#
SHELL=/bin/rsh
readonly SHELL
export SHELL

#
# MAIL	-- Where the user's system mailbox is located
#
#	If the user is not allowed to run "mail", this setting
#	of the MAIL envirnoment variable should be removed.
#
MAIL=/usr/spool/mail/`logname`
readonly MAIL
export MAIL

#
# Normal-style user setup goes here.
#
# use default system file creation mask

eval `tset -m ansi:ansi -m :\?ansi -r -s -Q`

#
# PATH -- Where commands are searched for
#
#	The PATH should not include either /bin (else the user can run "sh",
#	the un-restricted Bourne Shell), or /usr/bin (for similar reasons).
#
PATH=$HOME/bin
readonly PATH
export PATH

#
# Current working directory
#
#	It is inadvisable to have a Restricted Bourne Shell user's
#	current working directory be the same as thier home directory.
#	Hence, we chdir to $HOME/work, making that directory be the
#	user's current working directory.
#
cd $HOME/work

#
# Done.  The restrictions of the Restricted Bourne Shell now apply.
#
