Chris PeBenito 17de1b
## <summary>Simple network management protocol services</summary>
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 33c7e6
##	Use snmp over a TCP connection.  (Deprecated)
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`snmp_tcp_connect',`
Chris PeBenito 33c7e6
	refpolicywarn(`$0($*) has been deprecated.')
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 33c7e6
##	Send and receive UDP traffic to SNMP  (Deprecated)
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`snmp_udp_chat',`
Chris PeBenito 33c7e6
	refpolicywarn(`$0($*) has been deprecated.')
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Read snmpd libraries.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`snmp_read_snmp_var_lib_files',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type snmpd_var_lib_t;
Chris PeBenito 17de1b
	')
Chris PeBenito c0868a
Chris PeBenito c0868a
	allow $1 snmpd_var_lib_t:dir list_dir_perms;
Chris PeBenito c0868a
	read_files_pattern($1,snmpd_var_lib_t,snmpd_var_lib_t)
Chris PeBenito c0868a
	read_lnk_files_pattern($1,snmpd_var_lib_t,snmpd_var_lib_t)
Chris PeBenito 17de1b
')
Chris PeBenito 8708d9
Chris PeBenito 8708d9
########################################
Chris PeBenito 8708d9
## <summary>
Chris PeBenito 8708d9
##	dontaudit Read snmpd libraries.
Chris PeBenito 8708d9
## </summary>
Chris PeBenito 8708d9
## <param name="domain">
Chris PeBenito 8708d9
##	<summary>
Chris PeBenito 6b19be
##	Domain to not audit.
Chris PeBenito 8708d9
##	</summary>
Chris PeBenito 8708d9
## </param>
Chris PeBenito 8708d9
#
Chris PeBenito 8708d9
interface(`snmp_dontaudit_read_snmp_var_lib_files',`
Chris PeBenito 8708d9
	gen_require(`
Chris PeBenito 8708d9
		type snmpd_var_lib_t;
Chris PeBenito 8708d9
	')
Chris PeBenito c0868a
	dontaudit $1 snmpd_var_lib_t:dir list_dir_perms;
Chris PeBenito c0868a
	dontaudit $1 snmpd_var_lib_t:file read_file_perms;
Chris PeBenito 8708d9
	dontaudit $1 snmpd_var_lib_t:lnk_file { getattr read };
Chris PeBenito 8708d9
')
Chris PeBenito 6b19be
Chris PeBenito 6b19be
########################################
Chris PeBenito 6b19be
## <summary>
Chris PeBenito 6b19be
##	dontaudit write snmpd libraries files.
Chris PeBenito 6b19be
## </summary>
Chris PeBenito 6b19be
## <param name="domain">
Chris PeBenito 6b19be
##	<summary>
Chris PeBenito 6b19be
##	Domain to not audit.
Chris PeBenito 6b19be
##	</summary>
Chris PeBenito 6b19be
## </param>
Chris PeBenito 6b19be
#
Chris PeBenito 6b19be
interface(`snmp_dontaudit_write_snmp_var_lib_files',`
Chris PeBenito 6b19be
	gen_require(`
Chris PeBenito 6b19be
		type snmpd_var_lib_t;
Chris PeBenito 6b19be
	')
Chris PeBenito 6b19be
Chris PeBenito 6b19be
	dontaudit $1 snmpd_var_lib_t:file write;
Chris PeBenito 6b19be
')
Chris PeBenito 7a5e2d
Chris PeBenito 7a5e2d
########################################
Chris PeBenito 7a5e2d
## <summary>
Chris PeBenito 7a5e2d
##	All of the rules required to administrate 
Chris PeBenito 7a5e2d
##	an snmp environment
Chris PeBenito 7a5e2d
## </summary>
Chris PeBenito 7a5e2d
## <param name="domain">
Chris PeBenito 7a5e2d
##	<summary>
Chris PeBenito 7a5e2d
##	Domain allowed access.
Chris PeBenito 7a5e2d
##	</summary>
Chris PeBenito 7a5e2d
## </param>
Chris PeBenito 7a5e2d
## <param name="role">
Chris PeBenito 7a5e2d
##	<summary>
Chris PeBenito 7a5e2d
##	The role to be allowed to manage the snmp domain.
Chris PeBenito 7a5e2d
##	</summary>
Chris PeBenito 7a5e2d
## </param>
Chris PeBenito 7a5e2d
## <param name="terminal">
Chris PeBenito 7a5e2d
##	<summary>
Chris PeBenito 7a5e2d
##	The type of the user terminal.
Chris PeBenito 7a5e2d
##	</summary>
Chris PeBenito 7a5e2d
## </param>
Chris PeBenito 7a5e2d
## <rolecap/>
Chris PeBenito 7a5e2d
#
Chris PeBenito 7a5e2d
interface(`snmp_admin',`
Chris PeBenito 7a5e2d
	gen_require(`
Chris PeBenito 7a5e2d
		type snmp_t, snmp_log_t;
Chris PeBenito 7a5e2d
		type snmp_var_lib_t, snmp_var_run_t;
Chris PeBenito 7a5e2d
	')
Chris PeBenito 7a5e2d
Chris PeBenito 7a5e2d
	allow $1 snmp_t:process { ptrace signal_perms getattr };
Chris PeBenito 7a5e2d
	ps_process_pattern($1, snmp_t)
Chris PeBenito 7a5e2d
	        
Chris PeBenito 7a5e2d
	logging_list_logs($1)
Chris PeBenito 7a5e2d
	manage_files_pattern($1, snmp_log_t, snmp_log_t)
Chris PeBenito 7a5e2d
Chris PeBenito 7a5e2d
	files_list_var_lib($1)
Chris PeBenito 7a5e2d
	manage_files_pattern($1, snmp_var_lib_t, snmp_var_lib_t)
Chris PeBenito 7a5e2d
Chris PeBenito 7a5e2d
	files_list_pids($1)
Chris PeBenito 7a5e2d
	manage_files_pattern($1, snmp_var_run_t, snmp_var_run_t)
Chris PeBenito 7a5e2d
')