|
Chris PeBenito |
0fbfa5 |
#DESC SNMPD - Simple Network Management Protocol daemon
|
|
Chris PeBenito |
0fbfa5 |
#
|
|
Chris PeBenito |
0fbfa5 |
# Author: Russell Coker <russell@coker.com.au>
|
|
Chris PeBenito |
0fbfa5 |
# X-Debian-Packages: snmpd
|
|
Chris PeBenito |
0fbfa5 |
#
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
#################################
|
|
Chris PeBenito |
0fbfa5 |
#
|
|
Chris PeBenito |
0fbfa5 |
# Rules for the snmpd_t domain.
|
|
Chris PeBenito |
0fbfa5 |
#
|
|
Chris PeBenito |
0fbfa5 |
daemon_domain(snmpd)
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
#temp
|
|
Chris PeBenito |
0fbfa5 |
allow snmpd_t var_t:dir getattr;
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
can_network_server(snmpd_t)
|
|
Chris PeBenito |
0fbfa5 |
can_ypbind(snmpd_t)
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
type snmp_port_t, port_type, reserved_port_type;
|
|
Chris PeBenito |
0fbfa5 |
allow snmpd_t snmp_port_t:{ udp_socket tcp_socket } name_bind;
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
etc_domain(snmpd)
|
|
Chris PeBenito |
0fbfa5 |
typealias snmpd_etc_t alias etc_snmpd_t;
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
# for the .index file
|
|
Chris PeBenito |
0fbfa5 |
var_lib_domain(snmpd)
|
|
Chris PeBenito |
0fbfa5 |
file_type_auto_trans(snmpd_t, var_t, snmpd_var_lib_t, dir)
|
|
Chris PeBenito |
0fbfa5 |
file_type_auto_trans(snmpd_t, { usr_t var_t }, snmpd_var_lib_t, file)
|
|
Chris PeBenito |
0fbfa5 |
typealias snmpd_var_lib_t alias snmpd_var_rw_t;
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
log_domain(snmpd)
|
|
Chris PeBenito |
0fbfa5 |
# for /usr/share/snmp/mibs
|
|
Chris PeBenito |
0fbfa5 |
allow snmpd_t usr_t:file { getattr read };
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
can_udp_send(sysadm_t, snmpd_t)
|
|
Chris PeBenito |
0fbfa5 |
can_udp_send(snmpd_t, sysadm_t)
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
allow snmpd_t self:unix_dgram_socket create_socket_perms;
|
|
Chris PeBenito |
0fbfa5 |
allow snmpd_t self:unix_stream_socket create_socket_perms;
|
|
Chris PeBenito |
0fbfa5 |
allow snmpd_t etc_t:lnk_file read;
|
|
Chris PeBenito |
0fbfa5 |
allow snmpd_t { etc_t etc_runtime_t }:file r_file_perms;
|
|
Chris PeBenito |
0fbfa5 |
allow snmpd_t urandom_device_t:chr_file read;
|
|
Chris PeBenito |
0fbfa5 |
allow snmpd_t self:capability { dac_override kill net_bind_service net_admin sys_nice sys_tty_config };
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
allow snmpd_t proc_t:dir search;
|
|
Chris PeBenito |
0fbfa5 |
allow snmpd_t proc_t:file r_file_perms;
|
|
Chris PeBenito |
0fbfa5 |
allow snmpd_t self:file { getattr read };
|
|
Chris PeBenito |
0fbfa5 |
allow snmpd_t self:fifo_file { read write };
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
ifdef(`distro_redhat', `
|
|
Chris PeBenito |
0fbfa5 |
ifdef(`rpm.te', `
|
|
Chris PeBenito |
0fbfa5 |
r_dir_file(snmpd_t, rpm_var_lib_t)
|
|
Chris PeBenito |
0fbfa5 |
dontaudit snmpd_t rpm_var_lib_t:dir write;
|
|
Chris PeBenito |
0fbfa5 |
dontaudit snmpd_t rpm_var_lib_t:file write;
|
|
Chris PeBenito |
0fbfa5 |
')
|
|
Chris PeBenito |
0fbfa5 |
')
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
allow snmpd_t home_root_t:dir search;
|
|
Chris PeBenito |
0fbfa5 |
allow snmpd_t initrc_var_run_t:file r_file_perms;
|
|
Chris PeBenito |
0fbfa5 |
dontaudit snmpd_t initrc_var_run_t:file write;
|
|
Chris PeBenito |
0fbfa5 |
dontaudit snmpd_t rpc_pipefs_t:dir getattr;
|
|
Chris PeBenito |
0fbfa5 |
allow snmpd_t rpc_pipefs_t:dir getattr;
|
|
Chris PeBenito |
0fbfa5 |
read_sysctl(snmpd_t)
|
|
Chris PeBenito |
0fbfa5 |
dontaudit snmpd_t { removable_device_t fixed_disk_device_t }:blk_file { getattr ioctl read };
|
|
Chris PeBenito |
0fbfa5 |
allow snmpd_t sysfs_t:dir { getattr read search };
|
|
Chris PeBenito |
0fbfa5 |
ifdef(`amanda.te', `
|
|
Chris PeBenito |
0fbfa5 |
dontaudit snmpd_t amanda_dumpdates_t:file { getattr read };
|
|
Chris PeBenito |
0fbfa5 |
')
|
|
Chris PeBenito |
0fbfa5 |
ifdef(`cupsd.te', `
|
|
Chris PeBenito |
0fbfa5 |
allow snmpd_t cupsd_rw_etc_t:file { getattr read };
|
|
Chris PeBenito |
0fbfa5 |
')
|
|
Chris PeBenito |
0fbfa5 |
allow snmpd_t var_lib_nfs_t:dir search;
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
# needed in order to retrieve net traffic data
|
|
Chris PeBenito |
0fbfa5 |
allow snmpd_t proc_net_t:dir search;
|
|
Chris PeBenito |
0fbfa5 |
allow snmpd_t proc_net_t:file r_file_perms;
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
dontaudit snmpd_t domain:dir { getattr search };
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
dontaudit snmpd_t selinux_config_t:dir search;
|