Limiting Access to the Program Directory
The program directory provides enhanced security for the run task and run job process statements by limiting access to specified scripts and commands. Any attempt to execute a program or script outside the specified directory fails. The program directory is identified with the pstmt.run_dir parameter. If the program directory is specified, the UNIX restricted shell is invoked, providing enhanced security. If the program directory is not specified, the regular (Bourne) shell is invoked for executing commands with no restrictions.
The restricted shell is very similar to the regular (Bourne) shell, but it restricts the user from performing the following functions:
- Changing the directory (cd)
- Changing PATH or SHELL environment variables
- Using command names containing a slash (/) character
- Redirecting output (> and >>)
Additional information about the restricted shell can be found in the appropriate UNIX manual pages or UNIX security text books.
HOME=run_dir IFS=whitespace characters (tab, space, and newline) PATH=/usr/rbin and run_dir LOGNAME=user's UNIX ID
Because environment variables are not inherited from the parent Process, no data can be passed to the script or command through shell environment variables. The restricted shell restricts access to specified scripts and commands, but it does not restrict what the scripts and commands can do. For example, a shell script being executed within the run_dir directory can change the value of PATH and execute command names containing a slash (/) character. For this reason, it is important that the system administrator controls which scripts and commands the user has access to and does not give the user write privileges to the run_dir directory or any of the files in the run_dir directory.