|
Chris PeBenito |
0fbfa5 |
#DESC mdadm - Linux RAID tool
|
|
Chris PeBenito |
0fbfa5 |
#
|
|
Chris PeBenito |
0fbfa5 |
# Author: Colin Walters <walters@redhat.com>
|
|
Chris PeBenito |
0fbfa5 |
#
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
daemon_base_domain(mdadm, `, fs_domain')
|
|
Chris PeBenito |
0fbfa5 |
role sysadm_r types mdadm_t;
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
allow initrc_t mdadm_var_run_t:file create_file_perms;
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
# Kernel filesystem permissions
|
|
Chris PeBenito |
0fbfa5 |
r_dir_file(mdadm_t, proc_t)
|
|
Chris PeBenito |
0fbfa5 |
allow mdadm_t proc_mdstat_t:file rw_file_perms;
|
|
Chris PeBenito |
0fbfa5 |
read_sysctl(mdadm_t)
|
|
Chris PeBenito |
0fbfa5 |
r_dir_file(mdadm_t, sysfs_t)
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
# Configuration
|
|
Chris PeBenito |
0fbfa5 |
allow mdadm_t { etc_t etc_runtime_t }:file { getattr read };
|
|
Chris PeBenito |
0fbfa5 |
read_locale(mdadm_t)
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
# Linux capabilities
|
|
Chris PeBenito |
0fbfa5 |
allow mdadm_t self:capability { dac_override sys_admin ipc_lock };
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
# Helper program access
|
|
Chris PeBenito |
0fbfa5 |
can_exec(mdadm_t, { bin_t sbin_t })
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
# RAID block device access
|
|
Chris PeBenito |
0fbfa5 |
allow mdadm_t fixed_disk_device_t:blk_file create_file_perms;
|
|
Chris PeBenito |
0fbfa5 |
allow mdadm_t device_t:lnk_file { getattr read };
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
# Ignore attempts to read every device file
|
|
Chris PeBenito |
0fbfa5 |
dontaudit mdadm_t device_type:{ chr_file blk_file } getattr;
|
|
Chris PeBenito |
0fbfa5 |
dontaudit mdadm_t device_t:{ fifo_file file dir chr_file blk_file } { read getattr };
|
|
Chris PeBenito |
0fbfa5 |
dontaudit mdadm_t devpts_t:dir r_dir_perms;
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
# Ignore attempts to read/write sysadmin tty
|
|
Chris PeBenito |
0fbfa5 |
dontaudit mdadm_t sysadm_tty_device_t:chr_file rw_file_perms;
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
# Other random ignores
|
|
Chris PeBenito |
0fbfa5 |
dontaudit mdadm_t tmpfs_t:dir r_dir_perms;
|
|
Chris PeBenito |
0fbfa5 |
dontaudit mdadm_t initctl_t:fifo_file getattr;
|
|
Chris PeBenito |
0fbfa5 |
var_run_domain(mdadm)
|
|
Chris PeBenito |
0fbfa5 |
allow mdadm_t var_t:dir { getattr search };
|