Chris PeBenito 29af4c
policy_module(raid, 1.10.0)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Declarations
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type mdadm_t;
Chris PeBenito 17de1b
type mdadm_exec_t;
Chris PeBenito 3f67f7
init_daemon_domain(mdadm_t, mdadm_exec_t)
Chris PeBenito 17de1b
role system_r types mdadm_t;
Chris PeBenito 17de1b
Dan Walsh d7544f
type mdadm_var_run_t alias mdadm_map_t;
Chris PeBenito 17de1b
files_pid_file(mdadm_var_run_t)
Dan Walsh e81afd
dev_associate(mdadm_var_run_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Local policy
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito 17de1b
allow mdadm_t self:capability { dac_override sys_admin ipc_lock };
Chris PeBenito 17de1b
dontaudit mdadm_t self:capability sys_tty_config;
Chris PeBenito 17de1b
allow mdadm_t self:process { sigchld sigkill sigstop signull signal };
Chris PeBenito c0868a
allow mdadm_t self:fifo_file rw_fifo_file_perms;
Chris PeBenito 17de1b
Dan Walsh 3eaa99
manage_dirs_pattern(mdadm_t, mdadm_var_run_t, mdadm_var_run_t)
Chris PeBenito 3f67f7
manage_files_pattern(mdadm_t, mdadm_var_run_t, mdadm_var_run_t)
Dan Walsh e81afd
manage_sock_files_pattern(mdadm_t, mdadm_var_run_t, mdadm_var_run_t)
Dan Walsh 3eaa99
files_pid_filetrans(mdadm_t, mdadm_var_run_t, { file dir })
Dan Walsh e81afd
dev_filetrans(mdadm_t, mdadm_var_run_t, { file dir sock_file })
Chris PeBenito 17de1b
Chris PeBenito 17de1b
kernel_read_system_state(mdadm_t)
Chris PeBenito 17de1b
kernel_read_kernel_sysctls(mdadm_t)
Chris PeBenito 17de1b
kernel_rw_software_raid_state(mdadm_t)
Chris PeBenito e2b84e
kernel_getattr_core_if(mdadm_t)
Chris PeBenito 17de1b
Chris PeBenito 48bf63
# Helper program access
Chris PeBenito 48bf63
corecmd_exec_bin(mdadm_t)
Chris PeBenito 48bf63
corecmd_exec_shell(mdadm_t)
Chris PeBenito 48bf63
Chris PeBenito 17de1b
dev_read_sysfs(mdadm_t)
Chris PeBenito 17de1b
# Ignore attempts to read every device file
Chris PeBenito 17de1b
dev_dontaudit_getattr_all_blk_files(mdadm_t)
Chris PeBenito 17de1b
dev_dontaudit_getattr_all_chr_files(mdadm_t)
Chris PeBenito e2b84e
dev_dontaudit_getattr_generic_files(mdadm_t)
Chris PeBenito d6d16b
dev_dontaudit_getattr_generic_chr_files(mdadm_t)
Chris PeBenito d6d16b
dev_dontaudit_getattr_generic_blk_files(mdadm_t)
Chris PeBenito 244b45
dev_read_realtime_clock(mdadm_t)
Chris PeBenito 2f0e3a
# unfortunately needed for DMI decoding:
Chris PeBenito 2f0e3a
dev_read_raw_memory(mdadm_t)
Dan Walsh f5b49a
dev_read_generic_files(mdadm_t)
Chris PeBenito 17de1b
Chris PeBenito 48bf63
domain_use_interactive_fds(mdadm_t)
Chris PeBenito 48bf63
Chris PeBenito 48bf63
files_read_etc_files(mdadm_t)
Chris PeBenito 48bf63
files_read_etc_runtime_files(mdadm_t)
Dan Walsh 3eaa99
files_dontaudit_getattr_tmpfs_files(mdadm_t)
Chris PeBenito 48bf63
Dan Walsh f5b49a
fs_list_hugetlbfs(mdadm_t)
Dan Walsh f5b49a
fs_list_auto_mountpoints(mdadm_t)
Chris PeBenito 17de1b
fs_dontaudit_list_tmpfs(mdadm_t)
Chris PeBenito 17de1b
Chris PeBenito 48bf63
mls_file_read_all_levels(mdadm_t)
Chris PeBenito 48bf63
mls_file_write_all_levels(mdadm_t)
Chris PeBenito 48bf63
Chris PeBenito 17de1b
# RAID block device access
Chris PeBenito 17de1b
storage_manage_fixed_disk(mdadm_t)
Chris PeBenito d6d16b
storage_dev_filetrans_fixed_disk(mdadm_t)
Chris PeBenito d534d3
storage_read_scsi_generic(mdadm_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
term_dontaudit_list_ptys(mdadm_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
init_dontaudit_getattr_initctl(mdadm_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
logging_send_syslog_msg(mdadm_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
miscfiles_read_localization(mdadm_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
userdom_dontaudit_use_unpriv_user_fds(mdadm_t)
Chris PeBenito 296273
userdom_dontaudit_search_user_home_content(mdadm_t)
Chris PeBenito 296273
userdom_dontaudit_use_user_terminals(mdadm_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
mta_send_mail(mdadm_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito d6d16b
	gpm_dontaudit_getattr_gpmctl(mdadm_t)
Chris PeBenito d6d16b
')
Chris PeBenito d6d16b
Chris PeBenito d6d16b
optional_policy(`
Chris PeBenito 17de1b
	seutil_sigchld_newrole(mdadm_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	udev_read_db(mdadm_t)
Chris PeBenito 17de1b
')
Chris PeBenito 556556
Chris PeBenito 556556
optional_policy(`
Chris PeBenito 556556
	unconfined_domain(mdadm_t)
Chris PeBenito 556556
')