selinux-policy/policy/modules/system/raid.te

101 lines
2.5 KiB
Plaintext
Raw Normal View History

2010-05-24 19:32:01 +00:00
policy_module(raid, 1.10.0)
2005-07-18 18:31:49 +00:00
########################################
2005-07-15 20:45:26 +00:00
#
2005-07-18 18:31:49 +00:00
# Declarations
2005-07-15 20:45:26 +00:00
#
2005-09-20 20:48:17 +00:00
type mdadm_t;
2005-07-15 20:45:26 +00:00
type mdadm_exec_t;
2009-06-26 14:40:13 +00:00
init_daemon_domain(mdadm_t, mdadm_exec_t)
2005-07-15 20:45:26 +00:00
role system_r types mdadm_t;
2010-09-10 16:14:25 +00:00
type mdadm_var_run_t alias mdadm_map_t;
2005-07-15 20:45:26 +00:00
files_pid_file(mdadm_var_run_t)
dev_associate(mdadm_var_run_t)
2005-07-15 20:45:26 +00:00
2005-07-18 18:31:49 +00:00
########################################
#
# Local policy
#
2005-07-15 20:45:26 +00:00
allow mdadm_t self:capability { dac_override sys_admin ipc_lock };
dontaudit mdadm_t self:capability sys_tty_config;
allow mdadm_t self:process { sigchld sigkill sigstop signull signal };
2006-12-12 20:08:08 +00:00
allow mdadm_t self:fifo_file rw_fifo_file_perms;
2005-07-15 20:45:26 +00:00
2010-08-26 13:41:21 +00:00
manage_dirs_pattern(mdadm_t, mdadm_var_run_t, mdadm_var_run_t)
2009-06-26 14:40:13 +00:00
manage_files_pattern(mdadm_t, mdadm_var_run_t, mdadm_var_run_t)
manage_sock_files_pattern(mdadm_t, mdadm_var_run_t, mdadm_var_run_t)
2010-08-26 13:41:21 +00:00
files_pid_filetrans(mdadm_t, mdadm_var_run_t, { file dir })
dev_filetrans(mdadm_t, mdadm_var_run_t, { file dir sock_file })
2005-07-15 20:45:26 +00:00
kernel_read_system_state(mdadm_t)
kernel_read_kernel_sysctls(mdadm_t)
2005-07-15 20:45:26 +00:00
kernel_rw_software_raid_state(mdadm_t)
kernel_getattr_core_if(mdadm_t)
2005-07-15 20:45:26 +00:00
2009-08-05 14:19:28 +00:00
# Helper program access
corecmd_exec_bin(mdadm_t)
corecmd_exec_shell(mdadm_t)
2005-07-15 20:45:26 +00:00
dev_read_sysfs(mdadm_t)
# Ignore attempts to read every device file
dev_dontaudit_getattr_all_blk_files(mdadm_t)
dev_dontaudit_getattr_all_chr_files(mdadm_t)
dev_dontaudit_getattr_generic_files(mdadm_t)
dev_dontaudit_getattr_generic_chr_files(mdadm_t)
dev_dontaudit_getattr_generic_blk_files(mdadm_t)
2009-03-20 13:58:15 +00:00
dev_read_realtime_clock(mdadm_t)
2010-03-09 20:33:29 +00:00
# unfortunately needed for DMI decoding:
dev_read_raw_memory(mdadm_t)
dev_read_generic_files(mdadm_t)
2005-07-15 20:45:26 +00:00
2009-08-05 14:19:28 +00:00
domain_use_interactive_fds(mdadm_t)
files_read_etc_files(mdadm_t)
files_read_etc_runtime_files(mdadm_t)
2010-08-26 13:41:21 +00:00
files_dontaudit_getattr_tmpfs_files(mdadm_t)
2009-08-05 14:19:28 +00:00
fs_list_hugetlbfs(mdadm_t)
fs_list_auto_mountpoints(mdadm_t)
2005-07-18 18:31:49 +00:00
fs_dontaudit_list_tmpfs(mdadm_t)
2005-07-15 20:45:26 +00:00
2009-08-05 14:19:28 +00:00
mls_file_read_all_levels(mdadm_t)
mls_file_write_all_levels(mdadm_t)
2005-07-15 20:45:26 +00:00
# RAID block device access
storage_manage_fixed_disk(mdadm_t)
storage_dev_filetrans_fixed_disk(mdadm_t)
2007-06-11 15:01:10 +00:00
storage_read_scsi_generic(mdadm_t)
2005-07-15 20:45:26 +00:00
term_dontaudit_list_ptys(mdadm_t)
init_dontaudit_getattr_initctl(mdadm_t)
logging_send_syslog_msg(mdadm_t)
miscfiles_read_localization(mdadm_t)
2006-02-20 21:33:25 +00:00
userdom_dontaudit_use_unpriv_user_fds(mdadm_t)
2008-11-05 16:10:46 +00:00
userdom_dontaudit_search_user_home_content(mdadm_t)
userdom_dontaudit_use_user_terminals(mdadm_t)
2005-07-15 20:45:26 +00:00
2005-09-20 20:48:17 +00:00
mta_send_mail(mdadm_t)
optional_policy(`
gpm_dontaudit_getattr_gpmctl(mdadm_t)
')
optional_policy(`
2005-07-15 20:45:26 +00:00
seutil_sigchld_newrole(mdadm_t)
')
optional_policy(`
2005-07-15 20:45:26 +00:00
udev_read_db(mdadm_t)
')
optional_policy(`
unconfined_domain(mdadm_t)
')