Chris PeBenito 8926b2
## <summary>Service for reporting kernel oopses to kerneloops.org</summary>
Chris PeBenito 782c10
Chris PeBenito 782c10
########################################
Chris PeBenito 782c10
## <summary>
Chris PeBenito 782c10
##	Execute a domain transition to run kerneloops.
Chris PeBenito 782c10
## </summary>
Chris PeBenito 782c10
## <param name="domain">
Chris PeBenito 782c10
## <summary>
Chris PeBenito 782c10
##	Domain allowed to transition.
Chris PeBenito 782c10
## </summary>
Chris PeBenito 782c10
## </param>
Chris PeBenito 782c10
#
Chris PeBenito 782c10
interface(`kerneloops_domtrans',`
Chris PeBenito 782c10
	gen_require(`
Chris PeBenito 782c10
		type kerneloops_t;
Chris PeBenito 6073ea
		type kerneloops_exec_t;
Chris PeBenito 782c10
	')
Chris PeBenito 782c10
Chris PeBenito 782c10
	domtrans_pattern($1, kerneloops_exec_t, kerneloops_t)
Chris PeBenito 782c10
')
Chris PeBenito 782c10
Chris PeBenito 782c10
########################################
Chris PeBenito 782c10
## <summary>
Chris PeBenito 782c10
##	Send and receive messages from
Chris PeBenito 782c10
##	kerneloops over dbus.
Chris PeBenito 782c10
## </summary>
Chris PeBenito 782c10
## <param name="domain">
Chris PeBenito 782c10
##	<summary>
Chris PeBenito 782c10
##	Domain allowed access.
Chris PeBenito 782c10
##	</summary>
Chris PeBenito 782c10
## </param>
Chris PeBenito 782c10
#
Chris PeBenito 782c10
interface(`kerneloops_dbus_chat',`
Chris PeBenito 782c10
	gen_require(`
Chris PeBenito 782c10
		type kerneloops_t;
Chris PeBenito 782c10
		class dbus send_msg;
Chris PeBenito 782c10
	')
Chris PeBenito 782c10
Chris PeBenito 782c10
	allow $1 kerneloops_t:dbus send_msg;
Chris PeBenito 782c10
	allow kerneloops_t $1:dbus send_msg;
Chris PeBenito 782c10
')
Chris PeBenito 782c10
Chris PeBenito 782c10
########################################
Chris PeBenito 782c10
## <summary>
Chris PeBenito 782c10
##	dontaudit attempts to Send and receive messages from
Chris PeBenito 782c10
##	kerneloops over dbus.
Chris PeBenito 782c10
## </summary>
Chris PeBenito 782c10
## <param name="domain">
Chris PeBenito 782c10
##	<summary>
Chris PeBenito 782c10
##	Domain allowed access.
Chris PeBenito 782c10
##	</summary>
Chris PeBenito 782c10
## </param>
Chris PeBenito 782c10
#
Chris PeBenito 782c10
interface(`kerneloops_dontaudit_dbus_chat',`
Chris PeBenito 782c10
	gen_require(`
Chris PeBenito 782c10
		type kerneloops_t;
Chris PeBenito 782c10
		class dbus send_msg;
Chris PeBenito 782c10
	')
Chris PeBenito 782c10
Chris PeBenito 782c10
	dontaudit $1 kerneloops_t:dbus send_msg;
Chris PeBenito 782c10
	dontaudit kerneloops_t $1:dbus send_msg;
Chris PeBenito 782c10
')
Chris PeBenito 782c10
Chris PeBenito 782c10
########################################
Chris PeBenito 782c10
## <summary>
Chris PeBenito bb8816
##	Allow domain to manage kerneloops tmp files
Chris PeBenito bb8816
## </summary>
Chris PeBenito bb8816
## <param name="domain">
Chris PeBenito bb8816
##	<summary>
Chris PeBenito bb8816
##	Domain to not audit.
Chris PeBenito bb8816
##	</summary>
Chris PeBenito bb8816
## </param>
Chris PeBenito bb8816
#
Chris PeBenito bb8816
interface(`kerneloops_manage_tmp_files',`
Chris PeBenito bb8816
	gen_require(`
Chris PeBenito bb8816
		type kerneloops_tmp_t;
Chris PeBenito bb8816
	')
Chris PeBenito bb8816
Chris PeBenito bb8816
	manage_files_pattern($1, kerneloops_tmp_t, kerneloops_tmp_t)
Chris PeBenito bb8816
	files_search_tmp($1)
Chris PeBenito bb8816
')
Chris PeBenito bb8816
Chris PeBenito bb8816
########################################
Chris PeBenito bb8816
## <summary>
Chris PeBenito 782c10
##	All of the rules required to administrate 
Chris PeBenito 782c10
##	an kerneloops environment
Chris PeBenito 782c10
## </summary>
Chris PeBenito 782c10
## <param name="domain">
Chris PeBenito 782c10
##	<summary>
Chris PeBenito 782c10
##	Domain allowed access.
Chris PeBenito 782c10
##	</summary>
Chris PeBenito 782c10
## </param>
Chris PeBenito 74993c
## <param name="role">
Chris PeBenito 74993c
##	<summary>
Chris PeBenito 74993c
##	The role to be allowed to manage the kerneloops domain.
Chris PeBenito 74993c
##	</summary>
Chris PeBenito 74993c
## </param>
Chris PeBenito 782c10
## <rolecap/>
Chris PeBenito 782c10
#
Chris PeBenito 782c10
interface(`kerneloops_admin',`
Chris PeBenito 782c10
	gen_require(`
Chris PeBenito 74993c
		type kerneloops_t, kerneloops_initrc_exec_t;
Chris PeBenito bb8816
		type kerneloops_tmp_t;
Chris PeBenito 782c10
	')
Chris PeBenito 782c10
Chris PeBenito 782c10
	allow $1 kerneloops_t:process { ptrace signal_perms };
Chris PeBenito 782c10
	ps_process_pattern($1, kerneloops_t)
Chris PeBenito 74993c
Chris PeBenito 74993c
	init_labeled_script_domtrans($1, kerneloops_initrc_exec_t)
Chris PeBenito 74993c
	domain_system_change_exemption($1)
Chris PeBenito 74993c
	role_transition $2 kerneloops_initrc_exec_t system_r;
Chris PeBenito 74993c
	allow $2 system_r;
Chris PeBenito bb8816
Chris PeBenito bb8816
	admin_pattern($1, kerneloops_tmp_t)
Chris PeBenito 782c10
')