Chris PeBenito 17de1b
Chris PeBenito 449d20
policy_module(snmp, 1.10.2)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Declarations
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
type snmpd_t;
Chris PeBenito 17de1b
type snmpd_exec_t;
Chris PeBenito 0bfccd
init_daemon_domain(snmpd_t, snmpd_exec_t)
Chris PeBenito 17de1b
Chris PeBenito fb4826
type snmpd_initrc_exec_t;
Chris PeBenito fb4826
init_script_file(snmpd_initrc_exec_t)
Chris PeBenito fb4826
Chris PeBenito 17de1b
type snmpd_log_t;
Chris PeBenito 17de1b
logging_log_file(snmpd_log_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type snmpd_var_run_t;
Chris PeBenito 17de1b
files_pid_file(snmpd_var_run_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type snmpd_var_lib_t;
Chris PeBenito 17de1b
files_type(snmpd_var_lib_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Local policy
Chris PeBenito 17de1b
#
Chris PeBenito 449d20
allow snmpd_t self:capability { chown dac_override kill ipc_lock sys_ptrace net_admin sys_nice sys_tty_config };
Chris PeBenito a39a93
dontaudit snmpd_t self:capability { sys_module sys_tty_config };
Chris PeBenito 207c4d
allow snmpd_t self:process { signal_perms getsched setsched };
Chris PeBenito c0868a
allow snmpd_t self:fifo_file rw_fifo_file_perms;
Chris PeBenito 17de1b
allow snmpd_t self:unix_dgram_socket create_socket_perms;
Chris PeBenito 17de1b
allow snmpd_t self:unix_stream_socket create_stream_socket_perms;
Chris PeBenito 17de1b
allow snmpd_t self:tcp_socket create_stream_socket_perms;
Chris PeBenito 17de1b
allow snmpd_t self:udp_socket connected_stream_socket_perms;
Chris PeBenito 17de1b
Chris PeBenito c0868a
allow snmpd_t snmpd_log_t:file manage_file_perms;
Chris PeBenito 3f67f7
logging_log_filetrans(snmpd_t, snmpd_log_t, file)
Chris PeBenito 17de1b
Chris PeBenito 0bfccd
manage_dirs_pattern(snmpd_t, snmpd_var_lib_t, snmpd_var_lib_t)
Chris PeBenito 0bfccd
manage_files_pattern(snmpd_t, snmpd_var_lib_t, snmpd_var_lib_t)
Chris PeBenito 0bfccd
manage_sock_files_pattern(snmpd_t, snmpd_var_lib_t, snmpd_var_lib_t)
Chris PeBenito 0bfccd
files_usr_filetrans(snmpd_t, snmpd_var_lib_t, file)
Chris PeBenito 0bfccd
files_var_filetrans(snmpd_t, snmpd_var_lib_t, { file dir sock_file })
Chris PeBenito 0bfccd
files_var_lib_filetrans(snmpd_t, snmpd_var_lib_t, file)
Chris PeBenito 17de1b
Chris PeBenito 0bfccd
manage_files_pattern(snmpd_t, snmpd_var_run_t, snmpd_var_run_t)
Chris PeBenito 0bfccd
files_pid_filetrans(snmpd_t, snmpd_var_run_t, file)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
kernel_read_device_sysctls(snmpd_t)
Chris PeBenito 17de1b
kernel_read_kernel_sysctls(snmpd_t)
Chris PeBenito fb4826
kernel_read_fs_sysctls(snmpd_t)
Chris PeBenito 17de1b
kernel_read_net_sysctls(snmpd_t)
Chris PeBenito 17de1b
kernel_read_proc_symlinks(snmpd_t)
Chris PeBenito 17de1b
kernel_read_system_state(snmpd_t)
Chris PeBenito 17de1b
kernel_read_network_state(snmpd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
corecmd_exec_bin(snmpd_t)
Chris PeBenito 17de1b
corecmd_exec_shell(snmpd_t)
Chris PeBenito 17de1b
Chris PeBenito 190066
corenet_all_recvfrom_unlabeled(snmpd_t)
Chris PeBenito 190066
corenet_all_recvfrom_netlabel(snmpd_t)
Chris PeBenito 668b30
corenet_tcp_sendrecv_generic_if(snmpd_t)
Chris PeBenito 668b30
corenet_udp_sendrecv_generic_if(snmpd_t)
Chris PeBenito c12621
corenet_tcp_sendrecv_generic_node(snmpd_t)
Chris PeBenito c12621
corenet_udp_sendrecv_generic_node(snmpd_t)
Chris PeBenito 17de1b
corenet_tcp_sendrecv_all_ports(snmpd_t)
Chris PeBenito 17de1b
corenet_udp_sendrecv_all_ports(snmpd_t)
Chris PeBenito c12621
corenet_tcp_bind_generic_node(snmpd_t)
Chris PeBenito c12621
corenet_udp_bind_generic_node(snmpd_t)
Chris PeBenito 17de1b
corenet_tcp_bind_snmp_port(snmpd_t)
Chris PeBenito 17de1b
corenet_udp_bind_snmp_port(snmpd_t)
Chris PeBenito 17de1b
corenet_sendrecv_snmp_server_packets(snmpd_t)
Chris PeBenito 80348b
corenet_tcp_connect_agentx_port(snmpd_t)
Chris PeBenito 207c4d
corenet_tcp_bind_agentx_port(snmpd_t)
Chris PeBenito 207c4d
corenet_udp_bind_agentx_port(snmpd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
dev_list_sysfs(snmpd_t)
Chris PeBenito 17de1b
dev_read_sysfs(snmpd_t)
Chris PeBenito 17de1b
dev_read_urand(snmpd_t)
Chris PeBenito 17de1b
dev_read_rand(snmpd_t)
Chris PeBenito d6d16b
dev_getattr_usbfs_dirs(snmpd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
domain_use_interactive_fds(snmpd_t)
Chris PeBenito 17de1b
domain_signull_all_domains(snmpd_t)
Chris PeBenito 17de1b
domain_read_all_domains_state(snmpd_t)
Chris PeBenito fb4826
domain_dontaudit_ptrace_all_domains(snmpd_t)
Chris PeBenito fb4826
domain_exec_all_entry_files(snmpd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
files_read_etc_files(snmpd_t)
Chris PeBenito 17de1b
files_read_usr_files(snmpd_t)
Chris PeBenito 17de1b
files_read_etc_runtime_files(snmpd_t)
Chris PeBenito 17de1b
files_search_home(snmpd_t)
Chris PeBenito 17de1b
Chris PeBenito d6d16b
fs_getattr_all_dirs(snmpd_t)
Chris PeBenito 17de1b
fs_getattr_all_fs(snmpd_t)
Chris PeBenito 17de1b
fs_search_auto_mountpoints(snmpd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
storage_dontaudit_read_fixed_disk(snmpd_t)
Chris PeBenito 17de1b
storage_dontaudit_read_removable_device(snmpd_t)
Chris PeBenito 17de1b
Chris PeBenito fb4826
auth_use_nsswitch(snmpd_t)
Chris PeBenito fb4826
auth_read_all_dirs_except_shadow(snmpd_t)
Chris PeBenito fb4826
Chris PeBenito 17de1b
init_read_utmp(snmpd_t)
Chris PeBenito 17de1b
init_dontaudit_write_utmp(snmpd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
logging_send_syslog_msg(snmpd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
miscfiles_read_localization(snmpd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
seutil_dontaudit_search_config(snmpd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
sysnet_read_config(snmpd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
userdom_dontaudit_use_unpriv_user_fds(snmpd_t)
Chris PeBenito 296273
userdom_dontaudit_search_user_home_dirs(snmpd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
ifdef(`distro_redhat', `
Chris PeBenito 17de1b
	optional_policy(`
Chris PeBenito 17de1b
		rpm_read_db(snmpd_t)
Chris PeBenito 17de1b
		rpm_dontaudit_manage_db(snmpd_t)
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	amanda_dontaudit_read_dumpdates(snmpd_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito fb4826
	consoletype_exec(snmpd_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito a39a93
	cups_read_rw_config(snmpd_t)
Chris PeBenito b129e2
')
Chris PeBenito b129e2
Chris PeBenito b129e2
optional_policy(`
Chris PeBenito a39a93
	mta_read_config(snmpd_t)
Chris PeBenito a39a93
	mta_search_queue(snmpd_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito a39a93
	rpc_search_nfs_state_data(snmpd_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito a39a93
	sendmail_read_log(snmpd_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	seutil_sigchld_newrole(snmpd_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito b129e2
	squid_read_config(snmpd_t)
Chris PeBenito b129e2
')
Chris PeBenito b129e2
Chris PeBenito b129e2
optional_policy(`
Chris PeBenito 17de1b
	udev_read_db(snmpd_t)
Chris PeBenito 17de1b
')
Chris PeBenito fb4826
Chris PeBenito fb4826
optional_policy(`
Chris PeBenito fb4826
	virt_stream_connect(snmpd_t)
Chris PeBenito fb4826
')
Chris PeBenito fb4826
Chris PeBenito fb4826
optional_policy(`
Chris PeBenito fb4826
	kernel_read_xen_state(snmpd_t)
Chris PeBenito fb4826
	kernel_write_xen_state(snmpd_t)
Chris PeBenito fb4826
Chris PeBenito fb4826
	xen_stream_connect(snmpd_t)
Chris PeBenito fb4826
	xen_stream_connect_xenstore(snmpd_t)
Chris PeBenito fb4826
')