|
Chris PeBenito |
d592b6 |
|
|
Chris PeBenito |
d592b6 |
policy_module(watchdog,1.0.0)
|
|
Chris PeBenito |
d592b6 |
|
|
Chris PeBenito |
d592b6 |
#################################
|
|
Chris PeBenito |
d592b6 |
#
|
|
Chris PeBenito |
d592b6 |
# Rules for the watchdog_t domain.
|
|
Chris PeBenito |
d592b6 |
#
|
|
Chris PeBenito |
d592b6 |
|
|
Chris PeBenito |
d592b6 |
type watchdog_t;
|
|
Chris PeBenito |
d592b6 |
type watchdog_exec_t;
|
|
Chris PeBenito |
d592b6 |
init_daemon_domain(watchdog_t,watchdog_exec_t)
|
|
Chris PeBenito |
d592b6 |
|
|
Chris PeBenito |
d592b6 |
type watchdog_log_t;
|
|
Chris PeBenito |
d592b6 |
logging_log_file(watchdog_log_t)
|
|
Chris PeBenito |
d592b6 |
|
|
Chris PeBenito |
d592b6 |
type watchdog_var_run_t;
|
|
Chris PeBenito |
d592b6 |
files_pid_file(watchdog_var_run_t)
|
|
Chris PeBenito |
d592b6 |
|
|
Chris PeBenito |
d592b6 |
########################################
|
|
Chris PeBenito |
d592b6 |
#
|
|
Chris PeBenito |
d592b6 |
# Declarations
|
|
Chris PeBenito |
d592b6 |
#
|
|
Chris PeBenito |
d592b6 |
|
|
Chris PeBenito |
d592b6 |
allow watchdog_t self:capability { sys_admin net_admin sys_boot ipc_lock sys_pacct sys_nice sys_resource };
|
|
Chris PeBenito |
d592b6 |
dontaudit watchdog_t self:capability sys_tty_config;
|
|
Chris PeBenito |
d592b6 |
allow watchdog_t self:process { setsched signal_perms };
|
|
Chris PeBenito |
d592b6 |
allow watchdog_t self:fifo_file rw_file_perms;
|
|
Chris PeBenito |
d592b6 |
allow watchdog_t self:unix_stream_socket create_socket_perms;
|
|
Chris PeBenito |
d592b6 |
allow watchdog_t self:tcp_socket create_stream_socket_perms;
|
|
Chris PeBenito |
d592b6 |
allow watchdog_t self:udp_socket create_socket_perms;
|
|
Chris PeBenito |
d592b6 |
|
|
Chris PeBenito |
d592b6 |
allow watchdog_t watchdog_log_t:file create_file_perms;
|
|
Chris PeBenito |
d592b6 |
logging_log_filetrans(watchdog_t,watchdog_log_t,file)
|
|
Chris PeBenito |
d592b6 |
|
|
Chris PeBenito |
d592b6 |
allow watchdog_t watchdog_var_run_t:file create_file_perms;
|
|
Chris PeBenito |
d592b6 |
allow watchdog_t watchdog_var_run_t:dir rw_dir_perms;
|
|
Chris PeBenito |
d592b6 |
files_pid_filetrans(watchdog_t,watchdog_var_run_t,file)
|
|
Chris PeBenito |
d592b6 |
|
|
Chris PeBenito |
d592b6 |
kernel_read_system_state(watchdog_t)
|
|
Chris PeBenito |
d592b6 |
kernel_read_kernel_sysctls(watchdog_t)
|
|
Chris PeBenito |
d592b6 |
kernel_unmount_proc(watchdog_t)
|
|
Chris PeBenito |
d592b6 |
|
|
Chris PeBenito |
d592b6 |
corecmd_search_sbin(watchdog_t)
|
|
Chris PeBenito |
d592b6 |
# for orderly shutdown
|
|
Chris PeBenito |
d592b6 |
corecmd_exec_shell(watchdog_t)
|
|
Chris PeBenito |
d592b6 |
|
|
Chris PeBenito |
d592b6 |
# cjp: why networking?
|
|
Chris PeBenito |
d592b6 |
corenet_non_ipsec_sendrecv(watchdog_t)
|
|
Chris PeBenito |
d592b6 |
corenet_tcp_sendrecv_generic_if(watchdog_t)
|
|
Chris PeBenito |
d592b6 |
corenet_udp_sendrecv_generic_if(watchdog_t)
|
|
Chris PeBenito |
d592b6 |
corenet_raw_sendrecv_generic_if(watchdog_t)
|
|
Chris PeBenito |
d592b6 |
corenet_tcp_sendrecv_all_nodes(watchdog_t)
|
|
Chris PeBenito |
d592b6 |
corenet_udp_sendrecv_all_nodes(watchdog_t)
|
|
Chris PeBenito |
d592b6 |
corenet_raw_sendrecv_all_nodes(watchdog_t)
|
|
Chris PeBenito |
d592b6 |
corenet_tcp_sendrecv_all_ports(watchdog_t)
|
|
Chris PeBenito |
d592b6 |
corenet_udp_sendrecv_all_ports(watchdog_t)
|
|
Chris PeBenito |
d592b6 |
corenet_tcp_bind_all_nodes(watchdog_t)
|
|
Chris PeBenito |
d592b6 |
corenet_udp_bind_all_nodes(watchdog_t)
|
|
Chris PeBenito |
d592b6 |
corenet_tcp_connect_all_ports(watchdog_t)
|
|
Chris PeBenito |
d592b6 |
|
|
Chris PeBenito |
d592b6 |
dev_read_sysfs(watchdog_t)
|
|
Chris PeBenito |
d592b6 |
dev_write_watchdog(watchdog_t)
|
|
Chris PeBenito |
d592b6 |
# do not care about saving the random seed
|
|
Chris PeBenito |
d592b6 |
dev_dontaudit_read_rand(watchdog_t)
|
|
Chris PeBenito |
d592b6 |
dev_dontaudit_read_urand(watchdog_t)
|
|
Chris PeBenito |
d592b6 |
|
|
Chris PeBenito |
d592b6 |
domain_use_interactive_fds(watchdog_t)
|
|
Chris PeBenito |
d592b6 |
domain_getsession_all_domains(watchdog_t)
|
|
Chris PeBenito |
d592b6 |
domain_sigchld_all_domains(watchdog_t)
|
|
Chris PeBenito |
d592b6 |
domain_sigstop_all_domains(watchdog_t)
|
|
Chris PeBenito |
d592b6 |
domain_signull_all_domains(watchdog_t)
|
|
Chris PeBenito |
d592b6 |
domain_signal_all_domains(watchdog_t)
|
|
Chris PeBenito |
d592b6 |
domain_kill_all_domains(watchdog_t)
|
|
Chris PeBenito |
d592b6 |
|
|
Chris PeBenito |
d592b6 |
files_read_etc_files(watchdog_t)
|
|
Chris PeBenito |
d592b6 |
# for updating mtab on umount
|
|
Chris PeBenito |
d592b6 |
files_manage_etc_runtime_files(watchdog_t)
|
|
Chris PeBenito |
6714c2 |
files_etc_filetrans_etc_runtime(watchdog_t,file)
|
|
Chris PeBenito |
d592b6 |
|
|
Chris PeBenito |
d592b6 |
fs_unmount_xattr_fs(watchdog_t)
|
|
Chris PeBenito |
d592b6 |
fs_getattr_all_fs(watchdog_t)
|
|
Chris PeBenito |
d592b6 |
fs_search_auto_mountpoints(watchdog_t)
|
|
Chris PeBenito |
d592b6 |
|
|
Chris PeBenito |
d592b6 |
term_dontaudit_use_console(watchdog_t)
|
|
Chris PeBenito |
d592b6 |
|
|
Chris PeBenito |
d592b6 |
# record the fact that we are going down
|
|
Chris PeBenito |
d592b6 |
auth_append_login_records(watchdog_t)
|
|
Chris PeBenito |
d592b6 |
|
|
Chris PeBenito |
d592b6 |
init_use_fds(watchdog_t)
|
|
Chris PeBenito |
d592b6 |
init_use_script_ptys(watchdog_t)
|
|
Chris PeBenito |
d592b6 |
|
|
Chris PeBenito |
d592b6 |
libs_use_ld_so(watchdog_t)
|
|
Chris PeBenito |
d592b6 |
libs_use_shared_libs(watchdog_t)
|
|
Chris PeBenito |
d592b6 |
|
|
Chris PeBenito |
d592b6 |
logging_send_syslog_msg(watchdog_t)
|
|
Chris PeBenito |
d592b6 |
|
|
Chris PeBenito |
d592b6 |
miscfiles_read_localization(watchdog_t)
|
|
Chris PeBenito |
d592b6 |
|
|
Chris PeBenito |
d592b6 |
sysnet_read_config(watchdog_t)
|
|
Chris PeBenito |
d592b6 |
|
|
Chris PeBenito |
d592b6 |
userdom_dontaudit_use_unpriv_user_fds(watchdog_t)
|
|
Chris PeBenito |
d592b6 |
userdom_dontaudit_search_sysadm_home_dirs(watchdog_t)
|
|
Chris PeBenito |
d592b6 |
|
|
Chris PeBenito |
d592b6 |
ifdef(`targeted_policy',`
|
|
Chris PeBenito |
d592b6 |
term_dontaudit_use_unallocated_ttys(watchdog_t)
|
|
Chris PeBenito |
d592b6 |
term_dontaudit_use_generic_ptys(watchdog_t)
|
|
Chris PeBenito |
d592b6 |
files_dontaudit_read_root_files(watchdog_t)
|
|
Chris PeBenito |
d592b6 |
')
|
|
Chris PeBenito |
d592b6 |
|
|
Chris PeBenito |
d592b6 |
optional_policy(`
|
|
Chris PeBenito |
d592b6 |
mta_send_mail(watchdog_t)
|
|
Chris PeBenito |
d592b6 |
')
|
|
Chris PeBenito |
d592b6 |
|
|
Chris PeBenito |
d592b6 |
optional_policy(`
|
|
Chris PeBenito |
d592b6 |
nis_use_ypbind(watchdog_t)
|
|
Chris PeBenito |
d592b6 |
')
|
|
Chris PeBenito |
d592b6 |
|
|
Chris PeBenito |
d592b6 |
optional_policy(`
|
|
Chris PeBenito |
d592b6 |
seutil_sigchld_newrole(watchdog_t)
|
|
Chris PeBenito |
d592b6 |
')
|
|
Chris PeBenito |
d592b6 |
|
|
Chris PeBenito |
d592b6 |
optional_policy(`
|
|
Chris PeBenito |
d592b6 |
udev_read_db(watchdog_t)
|
|
Chris PeBenito |
d592b6 |
')
|