Chris PeBenito 17de1b
## <summary>mDNS/DNS-SD daemon implementing Apple ZeroConf architecture</summary>
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito fcee22
##	Execute avahi server in the avahi domain.
Chris PeBenito fcee22
## </summary>
Chris PeBenito fcee22
## <param name="domain">
Chris PeBenito fcee22
##	<summary>
Chris PeBenito fcee22
##	The type of the process performing this action.
Chris PeBenito fcee22
##	</summary>
Chris PeBenito fcee22
## </param>
Chris PeBenito fcee22
#
Chris PeBenito fcee22
interface(`avahi_domtrans',`
Chris PeBenito fcee22
	gen_require(`
Chris PeBenito fcee22
		type avahi_exec_t, avahi_t;
Chris PeBenito fcee22
	')
Chris PeBenito fcee22
Chris PeBenito fcee22
	corecmd_search_bin($1)
Chris PeBenito fcee22
	domtrans_pattern($1, avahi_exec_t, avahi_t)
Chris PeBenito fcee22
')
Chris PeBenito fcee22
Chris PeBenito fcee22
########################################
Chris PeBenito fcee22
## <summary>
Chris PeBenito fcee22
##	Send avahi a signal
Chris PeBenito fcee22
## </summary>
Chris PeBenito fcee22
## <param name="domain">
Chris PeBenito fcee22
##	<summary>
Chris PeBenito fcee22
##	The type of the process performing this action.
Chris PeBenito fcee22
##	</summary>
Chris PeBenito fcee22
## </param>
Chris PeBenito fcee22
#
Chris PeBenito fcee22
interface(`avahi_signal',`
Chris PeBenito fcee22
	gen_require(`
Chris PeBenito fcee22
		type avahi_t;
Chris PeBenito fcee22
	')
Chris PeBenito fcee22
Chris PeBenito fcee22
	allow $1 avahi_t:process signal;
Chris PeBenito fcee22
')
Chris PeBenito fcee22
Chris PeBenito fcee22
########################################
Chris PeBenito fcee22
## <summary>
Chris PeBenito fcee22
##	Send avahi a kill signal.
Chris PeBenito fcee22
## </summary>
Chris PeBenito fcee22
## <param name="domain">
Chris PeBenito fcee22
##	<summary>
Chris PeBenito fcee22
##	Domain allowed access.
Chris PeBenito fcee22
##	</summary>
Chris PeBenito fcee22
## </param>
Chris PeBenito fcee22
#
Chris PeBenito fcee22
interface(`avahi_kill',`
Chris PeBenito fcee22
	gen_require(`
Chris PeBenito fcee22
		type avahi_t;
Chris PeBenito fcee22
	')
Chris PeBenito fcee22
Chris PeBenito fcee22
	allow $1 avahi_t:process sigkill;
Chris PeBenito fcee22
')
Chris PeBenito fcee22
Chris PeBenito fcee22
########################################
Chris PeBenito fcee22
## <summary>
Chris PeBenito 17de1b
##	Send and receive messages from
Chris PeBenito 17de1b
##	avahi over dbus.
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(`avahi_dbus_chat',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type avahi_t;
Chris PeBenito 17de1b
		class dbus send_msg;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	allow $1 avahi_t:dbus send_msg;
Chris PeBenito 17de1b
	allow avahi_t $1:dbus send_msg;
Chris PeBenito 17de1b
')
Chris PeBenito d6d16b
Chris PeBenito d6d16b
########################################
Chris PeBenito d6d16b
## <summary>
Chris PeBenito d6d16b
##	Connect to avahi using a unix domain stream socket.
Chris PeBenito d6d16b
## </summary>
Chris PeBenito d6d16b
## <param name="domain">
Chris PeBenito d6d16b
##	<summary>
Chris PeBenito d6d16b
##	Domain allowed access.
Chris PeBenito d6d16b
##	</summary>
Chris PeBenito d6d16b
## </param>
Chris PeBenito d6d16b
#
Chris PeBenito d6d16b
interface(`avahi_stream_connect',`
Chris PeBenito d6d16b
	gen_require(`
Chris PeBenito d6d16b
		type avahi_t, avahi_var_run_t;
Chris PeBenito d6d16b
	')
Chris PeBenito d6d16b
Chris PeBenito d6d16b
	files_search_pids($1)
Chris PeBenito 0bfccd
	stream_connect_pattern($1, avahi_var_run_t, avahi_var_run_t, avahi_t)
Chris PeBenito d6d16b
')
Chris PeBenito 517618
Chris PeBenito 517618
########################################
Chris PeBenito 517618
## <summary>
Chris PeBenito 517618
##	Do not audit attempts to search the avahi pid directory.
Chris PeBenito 517618
## </summary>
Chris PeBenito 517618
## <param name="domain">
Chris PeBenito 517618
##	<summary>
Chris PeBenito 517618
##	Domain allowed access.
Chris PeBenito 517618
##	</summary>
Chris PeBenito 517618
## </param>
Chris PeBenito 517618
#
Chris PeBenito 517618
interface(`avahi_dontaudit_search_pid',`
Chris PeBenito 517618
	gen_require(`
Chris PeBenito 517618
		type avahi_var_run_t;
Chris PeBenito 517618
	')
Chris PeBenito 517618
Chris PeBenito 517618
	dontaudit $1 avahi_var_run_t:dir search_dir_perms;
Chris PeBenito 517618
')
Chris PeBenito fcee22
Chris PeBenito fcee22
########################################
Chris PeBenito fcee22
## <summary>
Chris PeBenito fcee22
##	All of the rules required to administrate 
Chris PeBenito fcee22
##	an avahi environment
Chris PeBenito fcee22
## </summary>
Chris PeBenito fcee22
## <param name="domain">
Chris PeBenito fcee22
##	<summary>
Chris PeBenito fcee22
##	Domain allowed access.
Chris PeBenito fcee22
##	</summary>
Chris PeBenito fcee22
## </param>
Chris PeBenito fcee22
## <param name="role">
Chris PeBenito fcee22
##	<summary>
Chris PeBenito fcee22
##	The role to be allowed to manage the avahi domain.
Chris PeBenito fcee22
##	</summary>
Chris PeBenito fcee22
## </param>
Chris PeBenito fcee22
## <rolecap/>
Chris PeBenito fcee22
#
Chris PeBenito fcee22
interface(`avahi_admin',`
Chris PeBenito fcee22
	gen_require(`
Chris PeBenito fcee22
		type avahi_t, avahi_var_run_t;
Chris PeBenito fcee22
		type avahi_initrc_exec_t;
Chris PeBenito fcee22
	')
Chris PeBenito fcee22
Chris PeBenito fcee22
	allow $1 avahi_t:process { ptrace signal_perms };
Chris PeBenito fcee22
	ps_process_pattern($1, avahi_t)
Chris PeBenito fcee22
Chris PeBenito fcee22
	init_labeled_script_domtrans($1, avahi_initrc_exec_t)
Chris PeBenito fcee22
	domain_system_change_exemption($1)
Chris PeBenito fcee22
	role_transition $2 avahi_initrc_exec_t system_r;
Chris PeBenito fcee22
	allow $2 system_r;
Chris PeBenito fcee22
Chris PeBenito fcee22
	files_list_pids($1)
Chris PeBenito fcee22
	admin_pattern($1, avahi_var_run_t)
Chris PeBenito fcee22
')