2005-05-16 21:10:33 +00:00
|
|
|
|
2007-02-16 23:01:42 +00:00
|
|
|
policy_module(userdomain,2.1.1)
|
2005-12-02 22:06:05 +00:00
|
|
|
|
|
|
|
gen_require(`
|
2006-01-26 18:04:57 +00:00
|
|
|
role sysadm_r, staff_r, user_r;
|
|
|
|
|
|
|
|
ifdef(`enable_mls',`
|
|
|
|
role secadm_r;
|
2006-06-12 21:36:38 +00:00
|
|
|
role auditadm_r;
|
2006-01-26 18:04:57 +00:00
|
|
|
')
|
2005-12-02 22:06:05 +00:00
|
|
|
')
|
2005-05-16 21:10:33 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
2005-05-19 21:06:06 +00:00
|
|
|
# admin users terminals (tty and pty)
|
|
|
|
attribute admin_terminal;
|
|
|
|
|
|
|
|
# users home directory
|
|
|
|
attribute home_dir_type;
|
|
|
|
|
|
|
|
# users home directory contents
|
|
|
|
attribute home_type;
|
|
|
|
|
2005-05-16 21:10:33 +00:00
|
|
|
# The privhome attribute identifies every domain that can create files under
|
|
|
|
# regular user home directories in the regular context (IE act on behalf of
|
|
|
|
# a user in writing regular files)
|
|
|
|
attribute privhome;
|
|
|
|
|
2005-08-17 17:31:57 +00:00
|
|
|
# all unprivileged users home directories
|
|
|
|
attribute user_home_dir_type;
|
|
|
|
attribute user_home_type;
|
|
|
|
|
|
|
|
# all unprivileged users ptys
|
|
|
|
attribute user_ptynode;
|
|
|
|
|
2005-06-27 16:30:55 +00:00
|
|
|
# all unprivileged users tmp files
|
|
|
|
attribute user_tmpfile;
|
|
|
|
|
2005-06-29 20:53:53 +00:00
|
|
|
# all unprivileged users ttys
|
|
|
|
attribute user_ttynode;
|
|
|
|
|
2005-05-16 21:10:33 +00:00
|
|
|
# all user domains
|
|
|
|
attribute userdomain;
|
|
|
|
|
|
|
|
# unprivileged user domains
|
|
|
|
attribute unpriv_userdomain;
|
|
|
|
|
2006-01-18 22:26:26 +00:00
|
|
|
attribute untrusted_content_type;
|
|
|
|
attribute untrusted_content_tmp_type;
|
|
|
|
|
2005-05-16 21:10:33 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Local policy
|
|
|
|
#
|
2005-05-18 13:20:16 +00:00
|
|
|
|
2006-09-06 22:07:25 +00:00
|
|
|
ifdef(`strict_policy',`
|
|
|
|
userdom_admin_user_template(sysadm)
|
|
|
|
userdom_unpriv_user_template(staff)
|
|
|
|
userdom_unpriv_user_template(user)
|
2005-07-06 20:28:29 +00:00
|
|
|
|
|
|
|
# user role change rules:
|
|
|
|
# sysadm_r can change to user roles
|
2006-09-06 22:07:25 +00:00
|
|
|
userdom_role_change_template(sysadm, user)
|
|
|
|
userdom_role_change_template(sysadm, staff)
|
2005-07-06 20:28:29 +00:00
|
|
|
|
|
|
|
# only staff_r can change to sysadm_r
|
2006-09-06 22:07:25 +00:00
|
|
|
userdom_role_change_template(staff, sysadm)
|
2007-02-16 23:01:42 +00:00
|
|
|
dontaudit staff_t admin_terminal:chr_file { read write };
|
2006-01-26 18:04:57 +00:00
|
|
|
|
|
|
|
ifdef(`enable_mls',`
|
2006-09-06 22:07:25 +00:00
|
|
|
userdom_unpriv_user_template(secadm)
|
|
|
|
userdom_unpriv_user_template(auditadm)
|
2006-06-12 21:36:38 +00:00
|
|
|
|
2006-09-06 22:07:25 +00:00
|
|
|
userdom_role_change_template(staff,auditadm)
|
|
|
|
userdom_role_change_template(staff,secadm)
|
2006-06-12 21:36:38 +00:00
|
|
|
|
2006-09-06 22:07:25 +00:00
|
|
|
userdom_role_change_template(sysadm,secadm)
|
|
|
|
userdom_role_change_template(sysadm,auditadm)
|
2006-06-12 21:36:38 +00:00
|
|
|
|
2006-09-06 22:07:25 +00:00
|
|
|
userdom_role_change_template(auditadm,secadm)
|
|
|
|
userdom_role_change_template(auditadm,sysadm)
|
2006-06-12 21:36:38 +00:00
|
|
|
|
2006-09-06 22:07:25 +00:00
|
|
|
userdom_role_change_template(secadm,auditadm)
|
|
|
|
userdom_role_change_template(secadm,sysadm)
|
2006-01-26 18:04:57 +00:00
|
|
|
')
|
2005-07-06 20:28:29 +00:00
|
|
|
|
|
|
|
# this should be tunable_policy, but
|
|
|
|
# currently type_change and RBAC allow
|
|
|
|
# do not work in conditionals
|
|
|
|
ifdef(`user_canbe_sysadm',`
|
2006-09-06 22:07:25 +00:00
|
|
|
userdom_role_change_template(user,sysadm)
|
2005-07-06 20:28:29 +00:00
|
|
|
')
|
2005-05-18 13:20:16 +00:00
|
|
|
|
2005-07-06 20:28:29 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Sysadm local policy
|
|
|
|
#
|
2005-05-19 21:06:06 +00:00
|
|
|
|
2005-07-06 20:28:29 +00:00
|
|
|
# for su
|
|
|
|
allow sysadm_t userdomain:fd use;
|
2005-05-18 13:20:16 +00:00
|
|
|
|
2005-07-06 20:28:29 +00:00
|
|
|
# Add/remove user home directories
|
2006-12-12 20:08:08 +00:00
|
|
|
allow sysadm_t user_home_dir_t:dir manage_dir_perms;
|
2006-03-02 23:41:11 +00:00
|
|
|
files_home_filetrans(sysadm_t,user_home_dir_t,dir)
|
2005-05-24 15:55:57 +00:00
|
|
|
|
2006-01-25 15:53:35 +00:00
|
|
|
corecmd_exec_shell(sysadm_t)
|
|
|
|
|
2006-01-06 22:51:40 +00:00
|
|
|
mls_process_read_up(sysadm_t)
|
|
|
|
|
2006-02-13 22:05:08 +00:00
|
|
|
init_exec(sysadm_t)
|
|
|
|
|
2006-09-25 18:53:06 +00:00
|
|
|
# Following for sending reboot and wall messages
|
|
|
|
userdom_use_unpriv_users_ptys(sysadm_t)
|
|
|
|
userdom_use_unpriv_users_ttys(sysadm_t)
|
|
|
|
|
2005-07-07 15:25:28 +00:00
|
|
|
ifdef(`direct_sysadm_daemon',`
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-07-07 15:25:28 +00:00
|
|
|
init_run_daemon(sysadm_t,sysadm_r,admin_terminal)
|
|
|
|
')
|
2006-02-21 15:57:49 +00:00
|
|
|
',`
|
|
|
|
ifdef(`distro_gentoo',`
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2006-02-21 15:57:49 +00:00
|
|
|
seutil_init_script_run_runinit(sysadm_t,sysadm_r,admin_terminal)
|
|
|
|
')
|
|
|
|
')
|
2005-07-07 15:25:28 +00:00
|
|
|
')
|
|
|
|
|
2006-01-27 20:13:08 +00:00
|
|
|
ifdef(`enable_mls',`
|
2006-10-31 21:01:48 +00:00
|
|
|
allow auditadm_t self:capability { dac_read_search dac_override };
|
2006-06-12 21:36:38 +00:00
|
|
|
seutil_run_runinit(auditadm_t, auditadm_r, { auditadm_tty_device_t auditadm_devpts_t })
|
|
|
|
domain_kill_all_domains(auditadm_t)
|
|
|
|
seutil_read_bin_policy(auditadm_t)
|
|
|
|
corecmd_exec_shell(auditadm_t)
|
2006-09-25 18:53:06 +00:00
|
|
|
logging_send_syslog_msg(auditadm_t)
|
2006-06-12 21:36:38 +00:00
|
|
|
logging_read_generic_logs(auditadm_t)
|
|
|
|
logging_manage_audit_log(auditadm_t)
|
|
|
|
logging_manage_audit_config(auditadm_t)
|
|
|
|
logging_run_auditctl(auditadm_t,auditadm_r,{ auditadm_tty_device_t auditadm_devpts_t })
|
|
|
|
logging_run_auditd(auditadm_t, auditadm_r, { auditadm_tty_device_t auditadm_devpts_t })
|
2006-09-25 18:53:06 +00:00
|
|
|
userdom_dontaudit_read_sysadm_home_content_files(auditadm_t)
|
2006-06-12 21:36:38 +00:00
|
|
|
|
2006-10-31 21:01:48 +00:00
|
|
|
allow secadm_t self:capability { dac_read_search dac_override };
|
2006-02-16 19:32:13 +00:00
|
|
|
corecmd_exec_shell(secadm_t)
|
2006-06-12 21:36:38 +00:00
|
|
|
domain_obj_id_change_exemption(secadm_t)
|
2006-02-16 19:32:13 +00:00
|
|
|
mls_process_read_up(secadm_t)
|
2006-06-12 21:36:38 +00:00
|
|
|
mls_file_read_up(secadm_t)
|
2006-02-16 19:32:13 +00:00
|
|
|
mls_file_write_down(secadm_t)
|
|
|
|
mls_file_upgrade(secadm_t)
|
|
|
|
mls_file_downgrade(secadm_t)
|
2006-06-12 21:36:38 +00:00
|
|
|
auth_relabel_all_files_except_shadow(secadm_t)
|
2006-10-31 21:01:48 +00:00
|
|
|
dev_relabel_all_dev_nodes(secadm_t)
|
2006-06-12 21:36:38 +00:00
|
|
|
auth_relabel_shadow(secadm_t)
|
2006-03-23 19:19:38 +00:00
|
|
|
init_exec(secadm_t)
|
2006-01-27 20:13:08 +00:00
|
|
|
logging_read_audit_log(secadm_t)
|
2006-06-12 21:36:38 +00:00
|
|
|
logging_read_generic_logs(secadm_t)
|
2006-12-04 20:10:56 +00:00
|
|
|
logging_read_audit_config(secadm_t)
|
2006-02-21 18:40:44 +00:00
|
|
|
userdom_dontaudit_append_staff_home_content_files(secadm_t)
|
2006-09-25 18:53:06 +00:00
|
|
|
userdom_dontaudit_read_sysadm_home_content_files(secadm_t)
|
2006-12-04 20:10:56 +00:00
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
aide_run(secadm_t,secadm_r, { secadm_tty_device_t secadm_devpts_t })
|
|
|
|
')
|
|
|
|
|
2006-10-31 21:01:48 +00:00
|
|
|
optional_policy(`
|
|
|
|
netlabel_run_mgmt(secadm_t,secadm_r, { secadm_tty_device_t secadm_devpts_t })
|
|
|
|
')
|
2006-09-06 22:07:25 +00:00
|
|
|
',`
|
2006-06-12 21:36:38 +00:00
|
|
|
logging_manage_audit_log(sysadm_t)
|
|
|
|
logging_manage_audit_config(sysadm_t)
|
2006-04-03 19:49:47 +00:00
|
|
|
logging_run_auditctl(sysadm_t,sysadm_r,admin_terminal)
|
2006-01-27 20:13:08 +00:00
|
|
|
')
|
|
|
|
|
2005-09-27 19:40:44 +00:00
|
|
|
tunable_policy(`allow_ptrace',`
|
|
|
|
domain_ptrace_all_domains(sysadm_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-10-22 19:58:58 +00:00
|
|
|
amanda_run_recover(sysadm_t,sysadm_r,admin_terminal)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-10-12 16:23:22 +00:00
|
|
|
apache_run_helper(sysadm_t,sysadm_r,admin_terminal)
|
2005-10-17 17:55:38 +00:00
|
|
|
#apache_run_all_scripts(sysadm_t,sysadm_r)
|
2005-10-12 16:23:22 +00:00
|
|
|
#apache_domtrans_sys_script(sysadm_t)
|
|
|
|
')
|
|
|
|
|
2007-02-16 23:01:42 +00:00
|
|
|
optional_policy(`
|
|
|
|
tzdata_domtrans(sysadm_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
raid_domtrans_mdadm(sysadm_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-10-10 18:11:46 +00:00
|
|
|
# cjp: why is this not apm_run_client
|
|
|
|
apm_domtrans_client(sysadm_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2006-03-08 18:43:05 +00:00
|
|
|
apt_run(sysadm_t,sysadm_r,admin_terminal)
|
|
|
|
')
|
|
|
|
|
2006-04-24 18:58:46 +00:00
|
|
|
optional_policy(`
|
|
|
|
backup_run(sysadm_t,sysadm_r,admin_terminal)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-07-06 20:28:29 +00:00
|
|
|
bootloader_run(sysadm_t,sysadm_r,admin_terminal)
|
|
|
|
')
|
2005-05-27 21:56:01 +00:00
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-08-23 17:26:19 +00:00
|
|
|
bind_run_ndc(sysadm_t,sysadm_r,admin_terminal)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-10-27 15:16:42 +00:00
|
|
|
bluetooth_run_helper(sysadm_t,sysadm_r,admin_terminal)
|
|
|
|
')
|
|
|
|
|
2006-06-07 17:43:10 +00:00
|
|
|
optional_policy(`
|
|
|
|
consoletype_run(sysadm_t,sysadm_r,admin_terminal)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-07-06 20:28:29 +00:00
|
|
|
clock_run(sysadm_t,sysadm_r,admin_terminal)
|
|
|
|
')
|
2005-06-27 20:59:28 +00:00
|
|
|
|
2006-05-08 14:16:10 +00:00
|
|
|
optional_policy(`
|
|
|
|
clockspeed_run_cli(sysadm_t,sysadm_r,admin_terminal)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2006-01-18 19:09:48 +00:00
|
|
|
certwatach_run(sysadm_t,sysadm_r,admin_terminal)
|
|
|
|
')
|
|
|
|
|
2006-05-17 14:50:31 +00:00
|
|
|
optional_policy(`
|
|
|
|
cvs_exec(sysadm_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2006-01-25 15:53:35 +00:00
|
|
|
consoletype_exec(sysadm_t)
|
2006-01-27 20:13:08 +00:00
|
|
|
|
|
|
|
ifdef(`enable_mls',`
|
2006-06-12 21:36:38 +00:00
|
|
|
consoletype_exec(auditadm_t)
|
2006-01-27 20:13:08 +00:00
|
|
|
')
|
2006-01-25 15:53:35 +00:00
|
|
|
')
|
|
|
|
|
2006-05-04 17:44:26 +00:00
|
|
|
optional_policy(`
|
|
|
|
dcc_run_cdcc(sysadm_t,sysadm_r,admin_terminal)
|
|
|
|
dcc_run_client(sysadm_t,sysadm_r,admin_terminal)
|
|
|
|
dcc_run_dbclean(sysadm_t,sysadm_r,admin_terminal)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2006-01-04 16:29:11 +00:00
|
|
|
ddcprobe_run(sysadm_t,sysadm_r,admin_terminal)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2006-01-27 20:13:08 +00:00
|
|
|
dmesg_exec(sysadm_t)
|
2006-02-13 22:05:08 +00:00
|
|
|
|
|
|
|
ifdef(`enable_mls',`
|
2006-06-12 21:36:38 +00:00
|
|
|
dmesg_exec(auditadm_t)
|
2006-02-13 22:05:08 +00:00
|
|
|
')
|
2006-01-27 20:13:08 +00:00
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-09-27 21:24:01 +00:00
|
|
|
dmidecode_run(sysadm_t,sysadm_r,admin_terminal)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2006-03-08 18:43:05 +00:00
|
|
|
dpkg_run(sysadm_t,sysadm_r,admin_terminal)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2006-03-14 21:54:26 +00:00
|
|
|
ethereal_run_tethereal(sysadm_t,sysadm_r,admin_terminal)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-08-17 14:14:07 +00:00
|
|
|
firstboot_run(sysadm_t,sysadm_r,sysadm_tty_device_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-07-06 20:28:29 +00:00
|
|
|
fstools_run(sysadm_t,sysadm_r,admin_terminal)
|
|
|
|
')
|
2005-05-27 21:56:01 +00:00
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-07-06 20:28:29 +00:00
|
|
|
hostname_run(sysadm_t,sysadm_r,admin_terminal)
|
|
|
|
')
|
2005-05-19 21:06:06 +00:00
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-07-18 18:31:49 +00:00
|
|
|
# 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)
|
2005-08-03 15:16:33 +00:00
|
|
|
ipsec_stream_connect(sysadm_t)
|
2005-07-18 18:31:49 +00:00
|
|
|
# for lsof
|
2006-02-02 21:08:12 +00:00
|
|
|
ipsec_getattr_key_sockets(sysadm_t)
|
2005-07-18 18:31:49 +00:00
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-07-06 20:28:29 +00:00
|
|
|
iptables_run(sysadm_t,sysadm_r,admin_terminal)
|
|
|
|
')
|
2005-05-23 15:51:33 +00:00
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-07-06 20:28:29 +00:00
|
|
|
libs_run_ldconfig(sysadm_t,sysadm_r,admin_terminal)
|
|
|
|
')
|
2005-05-19 21:06:06 +00:00
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-07-06 20:28:29 +00:00
|
|
|
lvm_run(sysadm_t,sysadm_r,admin_terminal)
|
|
|
|
')
|
2005-05-19 21:06:06 +00:00
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-09-23 19:38:34 +00:00
|
|
|
logrotate_run(sysadm_t,sysadm_r,admin_terminal)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-10-22 21:09:03 +00:00
|
|
|
lpd_run_checkpc(sysadm_t,sysadm_r,admin_terminal)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-09-23 19:38:34 +00:00
|
|
|
kudzu_run(sysadm_t,sysadm_r,admin_terminal)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-07-06 20:28:29 +00:00
|
|
|
modutils_run_depmod(sysadm_t,sysadm_r,admin_terminal)
|
|
|
|
modutils_run_insmod(sysadm_t,sysadm_r,admin_terminal)
|
|
|
|
modutils_run_update_mods(sysadm_t,sysadm_r,admin_terminal)
|
|
|
|
')
|
2005-06-28 20:54:49 +00:00
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-07-06 20:28:29 +00:00
|
|
|
mount_run(sysadm_t,sysadm_r,admin_terminal)
|
|
|
|
')
|
2005-06-27 16:30:55 +00:00
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-08-03 17:56:26 +00:00
|
|
|
mysql_stream_connect(sysadm_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-07-06 20:28:29 +00:00
|
|
|
netutils_run(sysadm_t,sysadm_r,admin_terminal)
|
|
|
|
netutils_run_ping(sysadm_t,sysadm_r,admin_terminal)
|
|
|
|
netutils_run_traceroute(sysadm_t,sysadm_r,admin_terminal)
|
|
|
|
')
|
2005-05-23 15:51:33 +00:00
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-10-24 01:53:13 +00:00
|
|
|
rpc_domtrans_nfsd(sysadm_t)
|
|
|
|
')
|
|
|
|
|
2006-04-28 15:50:06 +00:00
|
|
|
optional_policy(`
|
|
|
|
munin_stream_connect(sysadm_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-09-15 21:03:29 +00:00
|
|
|
ntp_stub()
|
|
|
|
corenet_udp_bind_ntp_port(sysadm_t)
|
|
|
|
')
|
|
|
|
|
2006-05-02 19:42:04 +00:00
|
|
|
optional_policy(`
|
|
|
|
oav_run_update(sysadm_t,sysadm_r,admin_terminal)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-07-14 20:57:17 +00:00
|
|
|
pcmcia_run_cardctl(sysadm_t,sysadm_r,admin_terminal)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2006-01-18 14:48:24 +00:00
|
|
|
portage_run(sysadm_t,sysadm_r,admin_terminal)
|
2006-05-29 14:16:22 +00:00
|
|
|
portage_run_gcc_config(sysadm_t,sysadm_r,admin_terminal)
|
2006-01-18 14:48:24 +00:00
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-09-08 17:12:38 +00:00
|
|
|
portmap_run_helper(sysadm_t,sysadm_r,admin_terminal)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-08-11 14:49:58 +00:00
|
|
|
quota_run(sysadm_t,sysadm_r,admin_terminal)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-07-06 20:28:29 +00:00
|
|
|
rpm_run(sysadm_t,sysadm_r,admin_terminal)
|
2005-06-03 12:25:14 +00:00
|
|
|
')
|
2005-05-19 21:06:06 +00:00
|
|
|
|
2006-05-17 14:50:31 +00:00
|
|
|
optional_policy(`
|
|
|
|
rsync_exec(sysadm_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-09-14 18:33:53 +00:00
|
|
|
samba_run_net(sysadm_t,sysadm_r,admin_terminal)
|
2005-09-28 18:22:58 +00:00
|
|
|
samba_run_winbind_helper(sysadm_t,sysadm_r,admin_terminal)
|
2005-09-14 18:33:53 +00:00
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-07-06 20:28:29 +00:00
|
|
|
seutil_run_restorecon(sysadm_t,sysadm_r,admin_terminal)
|
2006-01-27 20:13:08 +00:00
|
|
|
seutil_run_runinit(sysadm_t,sysadm_r,admin_terminal)
|
|
|
|
|
|
|
|
ifdef(`enable_mls',`
|
2007-02-16 23:01:42 +00:00
|
|
|
userdom_security_admin_template(secadm_t,secadm_r,{ secadm_tty_device_t sysadm_devpts_t })
|
2006-01-27 20:13:08 +00:00
|
|
|
', `
|
2007-02-16 23:01:42 +00:00
|
|
|
userdom_security_admin_template(sysadm_t,sysadm_r,admin_terminal)
|
2005-07-06 20:28:29 +00:00
|
|
|
')
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-07-06 20:28:29 +00:00
|
|
|
sysnet_run_ifconfig(sysadm_t,sysadm_r,admin_terminal)
|
2005-09-19 21:17:45 +00:00
|
|
|
sysnet_run_dhcpc(sysadm_t,sysadm_r,admin_terminal)
|
2005-07-06 20:28:29 +00:00
|
|
|
')
|
2005-05-19 21:06:06 +00:00
|
|
|
|
2006-04-24 18:00:32 +00:00
|
|
|
optional_policy(`
|
|
|
|
tripwire_run_siggen(sysadm_t,sysadm_r,admin_terminal)
|
|
|
|
tripwire_run_tripwire(sysadm_t,sysadm_r,admin_terminal)
|
|
|
|
tripwire_run_twadmin(sysadm_t,sysadm_r,admin_terminal)
|
|
|
|
tripwire_run_twprint(sysadm_t,sysadm_r,admin_terminal)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-07-18 18:31:49 +00:00
|
|
|
unconfined_domtrans(sysadm_t,sysadm_r,admin_terminal)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2006-01-11 18:28:57 +00:00
|
|
|
usbmodules_run(sysadm_t,sysadm_r,admin_terminal)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-11-25 15:51:50 +00:00
|
|
|
usermanage_run_admin_passwd(sysadm_t,sysadm_r,admin_terminal)
|
2005-07-06 20:28:29 +00:00
|
|
|
usermanage_run_groupadd(sysadm_t,sysadm_r,admin_terminal)
|
|
|
|
usermanage_run_useradd(sysadm_t,sysadm_r,admin_terminal)
|
|
|
|
')
|
2005-09-19 21:17:45 +00:00
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-09-19 21:17:45 +00:00
|
|
|
vpn_run(sysadm_t,sysadm_r,admin_terminal)
|
|
|
|
')
|
2005-10-12 17:22:25 +00:00
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-10-12 17:22:25 +00:00
|
|
|
webalizer_run(sysadm_t,sysadm_r,admin_terminal)
|
|
|
|
')
|
2006-04-28 18:30:02 +00:00
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
yam_run(sysadm_t,sysadm_r,admin_terminal)
|
|
|
|
')
|
2005-05-19 21:06:06 +00:00
|
|
|
')
|
2006-09-06 22:07:25 +00:00
|
|
|
|
|
|
|
ifdef(`targeted_policy',`
|
|
|
|
# Define some type aliases to help with compatibility with
|
|
|
|
# strict policy.
|
|
|
|
unconfined_alias_domain(secadm_t)
|
|
|
|
unconfined_alias_domain(auditadm_t)
|
|
|
|
unconfined_alias_domain(sysadm_t)
|
|
|
|
|
|
|
|
# User home directory type.
|
|
|
|
type user_home_t alias { staff_home_t sysadm_home_t }, home_type, user_home_type;
|
|
|
|
files_type(user_home_t)
|
|
|
|
files_associate_tmp(user_home_t)
|
|
|
|
fs_associate_tmpfs(user_home_t)
|
|
|
|
|
|
|
|
type user_home_dir_t alias { staff_home_dir_t sysadm_home_dir_t }, home_dir_type, home_type, user_home_dir_type;
|
|
|
|
files_type(user_home_dir_t)
|
|
|
|
files_associate_tmp(user_home_dir_t)
|
|
|
|
fs_associate_tmpfs(user_home_dir_t)
|
|
|
|
|
|
|
|
# compatibility for switching from strict
|
|
|
|
# dominance { role secadm_r { role system_r; }}
|
|
|
|
# dominance { role auditadm_r { role system_r; }}
|
|
|
|
# dominance { role sysadm_r { role system_r; }}
|
|
|
|
# dominance { role user_r { role system_r; }}
|
|
|
|
# dominance { role staff_r { role system_r; }}
|
|
|
|
|
|
|
|
# dont need to use the full role_change()
|
|
|
|
allow sysadm_r system_r;
|
|
|
|
allow sysadm_r user_r;
|
|
|
|
allow user_r system_r;
|
|
|
|
allow user_r sysadm_r;
|
|
|
|
allow system_r sysadm_r;
|
|
|
|
allow system_r sysadm_r;
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
manage_dirs_pattern(privhome,{ user_home_dir_t user_home_t },user_home_t)
|
|
|
|
manage_files_pattern(privhome,{ user_home_dir_t user_home_t },user_home_t)
|
|
|
|
manage_lnk_files_pattern(privhome,{ user_home_dir_t user_home_t },user_home_t)
|
|
|
|
manage_sock_files_pattern(privhome,{ user_home_dir_t user_home_t },user_home_t)
|
|
|
|
manage_fifo_files_pattern(privhome,{ user_home_dir_t user_home_t },user_home_t)
|
|
|
|
filetrans_pattern(privhome,user_home_dir_t,user_home_t,{ dir file lnk_file sock_file fifo_file })
|
2006-09-06 22:07:25 +00:00
|
|
|
files_search_home(privhome)
|
|
|
|
|
|
|
|
ifdef(`enable_mls',`
|
|
|
|
allow secadm_r system_r;
|
|
|
|
allow auditadm_r system_r;
|
|
|
|
allow secadm_r user_r;
|
|
|
|
allow staff_r secadm_r;
|
|
|
|
allow staff_r auditadm_r;
|
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
samba_per_role_template(user)
|
|
|
|
')
|
|
|
|
')
|