selinux-policy/policy/modules/roles/sysadm.te

331 lines
7.9 KiB
Plaintext

policy_module(sysadm, 1.0.0)
########################################
#
# Declarations
#
## <desc>
## <p>
## Allow sysadm to debug or ptrace all processes.
## </p>
## </desc>
gen_tunable(allow_ptrace, false)
role sysadm_r;
userdom_admin_user_template(sysadm)
ifndef(`enable_mls',`
userdom_security_admin_template(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
')
########################################
#
# Local policy
#
corecmd_exec_shell(sysadm_t)
mls_process_read_up(sysadm_t)
init_exec(sysadm_t)
# For sending reboot and wall messages
userdom_use_unpriv_users_ptys(sysadm_t)
userdom_use_unpriv_users_ttys(sysadm_t)
ifdef(`direct_sysadm_daemon',`
optional_policy(`
init_run_daemon(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
')
',`
ifdef(`distro_gentoo',`
optional_policy(`
seutil_init_script_run_runinit(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
')
')
')
ifndef(`enable_mls',`
logging_manage_audit_log(sysadm_t)
logging_manage_audit_config(sysadm_t)
logging_run_auditctl(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
')
tunable_policy(`allow_ptrace',`
domain_ptrace_all_domains(sysadm_t)
')
optional_policy(`
amanda_run_recover(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
')
optional_policy(`
apache_run_helper(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
#apache_run_all_scripts(sysadm_t, sysadm_r)
#apache_domtrans_sys_script(sysadm_t)
')
optional_policy(`
# cjp: why is this not apm_run_client
apm_domtrans_client(sysadm_t)
')
optional_policy(`
apt_run(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
')
optional_policy(`
auditadm_role_change_template(sysadm)
')
optional_policy(`
backup_run(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
')
optional_policy(`
bind_run_ndc(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
')
optional_policy(`
bootloader_run(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
')
optional_policy(`
certwatch_run(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
')
optional_policy(`
clock_run(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
')
optional_policy(`
clockspeed_run_cli(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
')
optional_policy(`
consoletype_run(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
')
optional_policy(`
cron_admin_template(sysadm)
')
optional_policy(`
cvs_exec(sysadm_t)
')
optional_policy(`
dcc_run_cdcc(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
dcc_run_client(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
dcc_run_dbclean(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
')
optional_policy(`
ddcprobe_run(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
')
optional_policy(`
dmesg_exec(sysadm_t)
')
optional_policy(`
dmidecode_run(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
')
optional_policy(`
dpkg_run(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
')
optional_policy(`
ethereal_run_tethereal(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
ethereal_admin_template(sysadm)
')
optional_policy(`
firstboot_run(sysadm_t, sysadm_r, sysadm_tty_device_t)
')
optional_policy(`
fstools_run(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
')
optional_policy(`
hostname_run(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
')
optional_policy(`
# allow system administrator to use the ipsec script to look
# at things (e.g., ipsec auto --status)
# probably should create an ipsec_admin role for this kind of thing
ipsec_exec_mgmt(sysadm_t)
ipsec_stream_connect(sysadm_t)
# for lsof
ipsec_getattr_key_sockets(sysadm_t)
')
optional_policy(`
iptables_run(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
')
optional_policy(`
kudzu_run(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
')
optional_policy(`
libs_run_ldconfig(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
')
optional_policy(`
logrotate_run(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
')
optional_policy(`
lpd_run_checkpc(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
lpr_admin_template(sysadm)
')
optional_policy(`
lvm_run(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
')
optional_policy(`
modutils_run_depmod(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
modutils_run_insmod(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
modutils_run_update_mods(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
')
optional_policy(`
mount_run(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
')
optional_policy(`
mta_admin_template(sysadm, sysadm_t)
')
optional_policy(`
munin_stream_connect(sysadm_t)
')
optional_policy(`
mysql_stream_connect(sysadm_t)
')
optional_policy(`
netutils_run(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
netutils_run_ping(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
netutils_run_traceroute(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
')
optional_policy(`
ntp_stub()
corenet_udp_bind_ntp_port(sysadm_t)
')
optional_policy(`
oav_run_update(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
')
optional_policy(`
pcmcia_run_cardctl(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
')
optional_policy(`
portage_run(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
portage_run_gcc_config(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
')
optional_policy(`
portmap_run_helper(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
')
optional_policy(`
quota_run(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
')
optional_policy(`
raid_domtrans_mdadm(sysadm_t)
')
optional_policy(`
rpc_domtrans_nfsd(sysadm_t)
')
optional_policy(`
rpm_run(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
')
optional_policy(`
rsync_exec(sysadm_t)
')
optional_policy(`
samba_run_net(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
samba_run_winbind_helper(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
')
optional_policy(`
secadm_role_change_template(sysadm)
')
optional_policy(`
seutil_run_setfiles(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
seutil_run_runinit(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
')
optional_policy(`
staff_role_change_template(sysadm)
')
optional_policy(`
sysnet_run_ifconfig(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
sysnet_run_dhcpc(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
')
optional_policy(`
tripwire_run_siggen(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
tripwire_run_tripwire(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
tripwire_run_twadmin(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
tripwire_run_twprint(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
')
optional_policy(`
tzdata_domtrans(sysadm_t)
')
optional_policy(`
unconfined_domtrans(sysadm_t)
')
optional_policy(`
# Add/remove user home directories
unprivuser_manage_home_dirs(sysadm_t)
unprivuser_home_filetrans_home_dir(sysadm_t)
unprivuser_role_change_template(sysadm)
')
optional_policy(`
usbmodules_run(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
')
optional_policy(`
usermanage_run_admin_passwd(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
usermanage_run_groupadd(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
usermanage_run_useradd(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
')
optional_policy(`
vpn_run(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
')
optional_policy(`
webalizer_run(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
')
optional_policy(`
yam_run(sysadm_t, sysadm_r, { sysadm_tty_device_t sysadm_devpts_t })
')