## Restricted (scp/sftp) only shell
########################################
##
## Role access for rssh
##
##
##
## Role allowed access
##
##
##
##
## User domain for the role
##
##
#
interface(`rssh_role',`
gen_require(`
type rssh_t;
')
role $1 types rssh_t;
# allow ps to show irc
ps_process_pattern($2, rssh_t)
allow $2 rssh_t:process signal;
')
########################################
##
## Transition to all user rssh domains.
##
##
##
## Domain allowed to transition.
##
##
#
interface(`rssh_spec_domtrans',`
gen_require(`
type rssh_t, rssh_exec_t;
')
spec_domtrans_pattern($1, rssh_exec_t, rssh_t)
')
########################################
##
## Execute the rssh program
## in the caller domain.
##
##
##
## Domain allowed access.
##
##
#
interface(`rssh_exec',`
gen_require(`
type rssh_exec_t;
')
can_exec($1, rssh_exec_t)
')
########################################
##
## Execute a domain transition to run rssh_chroot_helper.
##
##
##
## Domain allowed access.
##
##
#
interface(`rssh_domtrans_chroot_helper',`
gen_require(`
type rssh_chroot_helper_t, rssh_chroot_helper_exec_t;
')
domtrans_pattern($1, rssh_chroot_helper_exec_t, rssh_chroot_helper_t)
')
########################################
##
## Read all users rssh read-only content.
##
##
##
## Domain allowed access.
##
##
#
interface(`rssh_read_ro_content',`
gen_require(`
type rssh_ro_t;
')
allow $1 rssh_ro_t:dir list_dir_perms;
read_files_pattern($1, rssh_ro_t, rssh_ro_t)
read_lnk_files_pattern($1, rssh_ro_t, rssh_ro_t)
')