|
Chris PeBenito |
0fbfa5 |
#DESC Watchdog - Software watchdog daemon
|
|
Chris PeBenito |
0fbfa5 |
#
|
|
Chris PeBenito |
0fbfa5 |
# Author: Russell Coker <russell@coker.com.au>
|
|
Chris PeBenito |
0fbfa5 |
# X-Debian-Packages: watchdog
|
|
Chris PeBenito |
0fbfa5 |
#
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
#################################
|
|
Chris PeBenito |
0fbfa5 |
#
|
|
Chris PeBenito |
0fbfa5 |
# Rules for the watchdog_t domain.
|
|
Chris PeBenito |
0fbfa5 |
#
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
daemon_domain(watchdog, `, privmail')
|
|
Chris PeBenito |
0fbfa5 |
type watchdog_device_t, device_type, dev_fs;
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
2705f9 |
allow watchdog_t self:process setsched;
|
|
Chris PeBenito |
2705f9 |
|
|
Chris PeBenito |
0fbfa5 |
log_domain(watchdog)
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
allow watchdog_t etc_t:file r_file_perms;
|
|
Chris PeBenito |
0fbfa5 |
allow watchdog_t etc_t:lnk_file read;
|
|
Chris PeBenito |
0fbfa5 |
allow watchdog_t self:unix_dgram_socket create_socket_perms;
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
allow watchdog_t proc_t:file r_file_perms;
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
allow watchdog_t self:capability { ipc_lock sys_pacct sys_nice sys_resource };
|
|
Chris PeBenito |
0fbfa5 |
allow watchdog_t self:fifo_file rw_file_perms;
|
|
Chris PeBenito |
0fbfa5 |
allow watchdog_t self:unix_stream_socket create_socket_perms;
|
|
Chris PeBenito |
0fbfa5 |
can_network(watchdog_t)
|
|
Chris PeBenito |
2705f9 |
allow watchdog_t port_type:tcp_socket name_connect;
|
|
Chris PeBenito |
0fbfa5 |
can_ypbind(watchdog_t)
|
|
Chris PeBenito |
0fbfa5 |
allow watchdog_t bin_t:dir search;
|
|
Chris PeBenito |
0fbfa5 |
allow watchdog_t bin_t:lnk_file read;
|
|
Chris PeBenito |
0fbfa5 |
allow watchdog_t init_t:process signal;
|
|
Chris PeBenito |
0fbfa5 |
allow watchdog_t kernel_t:process sigstop;
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
allow watchdog_t watchdog_device_t:chr_file { getattr write };
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
# for orderly shutdown
|
|
Chris PeBenito |
0fbfa5 |
can_exec(watchdog_t, shell_exec_t)
|
|
Chris PeBenito |
0fbfa5 |
allow watchdog_t domain:process { signal_perms getsession };
|
|
Chris PeBenito |
0fbfa5 |
allow watchdog_t self:capability kill;
|
|
Chris PeBenito |
0fbfa5 |
allow watchdog_t sbin_t:dir search;
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
# for updating mtab on umount
|
|
Chris PeBenito |
0fbfa5 |
file_type_auto_trans(watchdog_t, etc_t, etc_runtime_t, file)
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
allow watchdog_t self:capability { sys_admin net_admin sys_boot };
|
|
Chris PeBenito |
0fbfa5 |
allow watchdog_t fixed_disk_device_t:blk_file swapon;
|
|
Chris PeBenito |
0fbfa5 |
allow watchdog_t { proc_t fs_t }:filesystem unmount;
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
# record the fact that we are going down
|
|
Chris PeBenito |
0fbfa5 |
allow watchdog_t wtmp_t:file append;
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
# do not care about saving the random seed
|
|
Chris PeBenito |
0fbfa5 |
dontaudit watchdog_t { urandom_device_t random_device_t }:chr_file read;
|