2020-07-04 13:30:45 +00:00
|
|
|
policy_module(wdmd, 1.5.1)
|
2018-06-23 13:00:56 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type wdmd_t;
|
|
|
|
type wdmd_exec_t;
|
|
|
|
init_daemon_domain(wdmd_t, wdmd_exec_t)
|
|
|
|
|
|
|
|
type wdmd_initrc_exec_t;
|
|
|
|
init_script_file(wdmd_initrc_exec_t)
|
|
|
|
|
2019-09-08 20:55:02 +00:00
|
|
|
type wdmd_runtime_t alias wdmd_var_run_t;
|
2020-06-27 21:11:48 +00:00
|
|
|
files_runtime_file(wdmd_runtime_t)
|
2018-06-23 13:00:56 +00:00
|
|
|
|
2019-09-11 00:05:46 +00:00
|
|
|
type wdmd_tmpfs_t;
|
|
|
|
files_tmpfs_file(wdmd_tmpfs_t)
|
|
|
|
|
2018-06-23 13:00:56 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
allow wdmd_t self:capability { chown ipc_lock sys_nice };
|
|
|
|
allow wdmd_t self:process { setsched signal };
|
|
|
|
allow wdmd_t self:fifo_file rw_fifo_file_perms;
|
|
|
|
allow wdmd_t self:unix_stream_socket { accept listen };
|
|
|
|
|
2019-09-08 20:55:02 +00:00
|
|
|
manage_dirs_pattern(wdmd_t, wdmd_runtime_t, wdmd_runtime_t)
|
|
|
|
manage_files_pattern(wdmd_t, wdmd_runtime_t, wdmd_runtime_t)
|
|
|
|
manage_sock_files_pattern(wdmd_t, wdmd_runtime_t, wdmd_runtime_t)
|
2020-06-27 21:11:48 +00:00
|
|
|
files_runtime_filetrans(wdmd_t, wdmd_runtime_t, { file dir sock_file })
|
2018-06-23 13:00:56 +00:00
|
|
|
|
|
|
|
manage_dirs_pattern(wdmd_t, wdmd_tmpfs_t, wdmd_tmpfs_t)
|
|
|
|
manage_files_pattern(wdmd_t, wdmd_tmpfs_t, wdmd_tmpfs_t)
|
|
|
|
fs_tmpfs_filetrans(wdmd_t, wdmd_tmpfs_t, { dir file })
|
|
|
|
|
|
|
|
kernel_read_system_state(wdmd_t)
|
|
|
|
|
|
|
|
corecmd_exec_bin(wdmd_t)
|
|
|
|
corecmd_exec_shell(wdmd_t)
|
|
|
|
|
|
|
|
dev_read_watchdog(wdmd_t)
|
|
|
|
dev_write_watchdog(wdmd_t)
|
|
|
|
|
|
|
|
fs_read_anon_inodefs_files(wdmd_t)
|
|
|
|
|
|
|
|
auth_use_nsswitch(wdmd_t)
|
|
|
|
|
|
|
|
logging_send_syslog_msg(wdmd_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(wdmd_t)
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
corosync_initrc_domtrans(wdmd_t)
|
|
|
|
corosync_stream_connect(wdmd_t)
|
|
|
|
corosync_rw_tmpfs(wdmd_t)
|
|
|
|
')
|