SESSION(1)

NAME
session - substitute labels temporarily

SYNOPSIS
/bin/session [ option ... ]

DESCRIPTION
Session runs a subshell with a temporary security label. It first calculates the intended label and ceiling of the subshell from the argument list. If process licenses, or label or ceiling above the current ceiling are sought, session obtains authorization by demanding a password. If the authorization is sufficient for the intended label and ceiling, the labels of the subshell and of the file associated with file descriptor 0 are set accordingly. Descriptor 0 is restored to its original label when the subshell terminates.

The options are

-l label
    Set the label to the given value, specified as in atolab(3). If the value does not dominate the process label, clear the environment.

-p gumnlp
    Set the process licenses, one or more of the letters umnlp as described in atolab(3). Implies option -n.

-n  Use nosh(8) rather than sh(1) as the subshell.

-x  Suppress the restoration of file descriptor labels.

-f file
    Change the label of file (a full pathname) as well as file descriptor 0; restore the label when done. A special password for file will be demanded, and the subshell labels will be set to a value listed in the password file /etc/pwfile. Implies option -n; precludes option -u.

-u user
    A special password for user will be demanded, and the subshell ceiling will be set to the value listed for user in /etc/pwfile. Precludes option -f.

The following arguments are meant for login(8):

-Q  Ask for bottom, untrusted values of process and ceiling labels. Suppress error messages on standard error output.

-c file
    Execute file as the subshell instead of sh(1) or nosh(8). All subsequent arguments are used to form the argument list of the subshell.

If a password is needed for authorization and neither the -f or -u options were given, session will ask for the password listed under the current login name, as revealed by getlogname(2). In the absence of option -p all licenses are relinquished.

Session requires a `trusted path' for password negotiations. Thus privileged work cannot be initiated from an untrusted computer or from a terminal into which untrusted code has been downloaded.

EXAMPLES

session -l ffff...
    Enter a top-label interactive terminal subsession.

    session -l 0
    HOME=/usr/yourname
    . $HOME/.profile

    Enter a bottom-label subsession within a higher-label subsession. Restore the environment.

    /bin/session -f /dev/ra00
    lmask n /etc/fsck /dev/ra00

    Enter a disk-repair session, using nosh(8).

session -Qx -u ken -c /bin/sh -sh
    How login(8) sets up a session for a service request.

session -Qx -c /bin/sh -sh
    How login sets up a remote session for con(1).

SEE ALSO
sh(1), getflab(2), getplab(2), pwfile(5), login(8), nosh(8)

DIAGNOSTICS
`Sorry', instead of asking for a password: untrusted path.