Chris PeBenito 17de1b
Chris PeBenito 2f0e3a
policy_module(raid, 1.9.2)
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
Chris PeBenito 0cad9a
type mdadm_map_t;
Chris PeBenito 0cad9a
files_type(mdadm_map_t)
Chris PeBenito 0cad9a
Chris PeBenito 17de1b
type mdadm_var_run_t;
Chris PeBenito 17de1b
files_pid_file(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
Chris PeBenito 0cad9a
# create .mdadm files in /dev
Chris PeBenito 0cad9a
allow mdadm_t mdadm_map_t:file manage_file_perms;
Chris PeBenito 0cad9a
dev_filetrans(mdadm_t, mdadm_map_t, file)
Chris PeBenito 0cad9a
Chris PeBenito 3f67f7
manage_files_pattern(mdadm_t, mdadm_var_run_t, mdadm_var_run_t)
Chris PeBenito 3f67f7
files_pid_filetrans(mdadm_t, mdadm_var_run_t, 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)
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)
Chris PeBenito 48bf63
Chris PeBenito 17de1b
fs_search_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
')