Chris PeBenito ab58ad
#DESC Su - Run shells with substitute user and group
Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
# Domains for the su program.
Chris PeBenito ab58ad
# X-Debian-Packages: login
Chris PeBenito ab58ad
Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
# su_exec_t is the type of the su executable.
Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
type su_exec_t, file_type, sysadmfile;
Chris PeBenito ab58ad
Chris PeBenito ab58ad
allow sysadm_su_t user_home_dir_type:dir search;
Chris PeBenito ab58ad
Chris PeBenito ab58ad
# Everything else is in the su_domain macro in
Chris PeBenito ab58ad
# macros/program/su_macros.te.
Chris PeBenito ab58ad
Chris PeBenito ab58ad
ifdef(`use_mcs', `
Chris PeBenito ab58ad
ifdef(`targeted_policy', `
Chris PeBenito ab58ad
range_transition unconfined_t su_exec_t s0 - s0:c0.c255;
Chris PeBenito ab58ad
domain_auto_trans(unconfined_t, su_exec_t, sysadm_su_t)
Chris PeBenito ab58ad
can_exec(sysadm_su_t, bin_t)
Chris PeBenito ab58ad
rw_dir_create_file(sysadm_su_t, home_dir_type)
Chris PeBenito ab58ad
')
Chris PeBenito ab58ad
')