policy_module(wdmd,1.0.0) ######################################## # # Declarations # type wdmd_t; type wdmd_exec_t; init_daemon_domain(wdmd_t, wdmd_exec_t) type wdmd_var_run_t; files_pid_file(wdmd_var_run_t) type wdmd_initrc_exec_t; init_script_file(wdmd_initrc_exec_t) type wdmd_tmpfs_t; files_tmpfs_file(wdmd_tmpfs_t) ######################################## # # wdmd local policy # allow wdmd_t self:capability { chown sys_nice ipc_lock }; allow wdmd_t self:process { setsched signal }; allow wdmd_t self:fifo_file rw_fifo_file_perms; allow wdmd_t self:unix_stream_socket create_stream_socket_perms; manage_dirs_pattern(wdmd_t, wdmd_var_run_t, wdmd_var_run_t) manage_files_pattern(wdmd_t, wdmd_var_run_t, wdmd_var_run_t) manage_sock_files_pattern(wdmd_t, wdmd_var_run_t, wdmd_var_run_t) files_pid_filetrans(wdmd_t, wdmd_var_run_t, { file dir sock_file }) 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 }) dev_read_watchdog(wdmd_t) dev_write_watchdog(wdmd_t) domain_use_interactive_fds(wdmd_t) fs_getattr_tmpfs(wdmd_t) fs_read_anon_inodefs_files(wdmd_t) auth_use_nsswitch(wdmd_t) logging_send_syslog_msg(wdmd_t)