|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
d9845a |
policy_module(raid,1.1.1)
|
|
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 |
17de1b |
init_daemon_domain(mdadm_t,mdadm_exec_t)
|
|
Chris PeBenito |
17de1b |
role system_r types mdadm_t;
|
|
Chris PeBenito |
17de1b |
|
|
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 |
d9845a |
allow mdadm_t self:fifo_file rw_file_perms;
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
d9845a |
allow mdadm_t mdadm_var_run_t:dir rw_dir_perms;
|
|
Chris PeBenito |
17de1b |
allow mdadm_t mdadm_var_run_t:file create_file_perms;
|
|
Chris PeBenito |
17de1b |
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 |
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 |
17de1b |
|
|
Chris PeBenito |
17de1b |
fs_search_auto_mountpoints(mdadm_t)
|
|
Chris PeBenito |
17de1b |
fs_dontaudit_list_tmpfs(mdadm_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# RAID block device access
|
|
Chris PeBenito |
17de1b |
storage_manage_fixed_disk(mdadm_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
term_dontaudit_use_console(mdadm_t)
|
|
Chris PeBenito |
17de1b |
term_dontaudit_list_ptys(mdadm_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# Helper program access
|
|
Chris PeBenito |
17de1b |
corecmd_exec_bin(mdadm_t)
|
|
Chris PeBenito |
17de1b |
corecmd_exec_sbin(mdadm_t)
|
|
Chris PeBenito |
d9845a |
corecmd_exec_shell(mdadm_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
domain_use_interactive_fds(mdadm_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
files_read_etc_files(mdadm_t)
|
|
Chris PeBenito |
17de1b |
files_read_etc_runtime_files(mdadm_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
init_use_fds(mdadm_t)
|
|
Chris PeBenito |
17de1b |
init_use_script_ptys(mdadm_t)
|
|
Chris PeBenito |
17de1b |
init_dontaudit_getattr_initctl(mdadm_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
libs_use_ld_so(mdadm_t)
|
|
Chris PeBenito |
17de1b |
libs_use_shared_libs(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 |
17de1b |
userdom_dontaudit_use_sysadm_ttys(mdadm_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
mta_send_mail(mdadm_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
ifdef(`targeted_policy',`
|
|
Chris PeBenito |
17de1b |
term_dontaudit_use_unallocated_ttys(mdadm_t)
|
|
Chris PeBenito |
17de1b |
term_dontaudit_use_generic_ptys(mdadm_t)
|
|
Chris PeBenito |
17de1b |
files_dontaudit_read_root_files(mdadm_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
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 |
')
|