Chris PeBenito 9b1907
## <summary>Pulseaudio network sound server.</summary>
Chris PeBenito 9b1907
Chris PeBenito 9b1907
########################################
Chris PeBenito 9b1907
## <summary>
Chris PeBenito 9b1907
##	Role access for pulseaudio
Chris PeBenito 9b1907
## </summary>
Chris PeBenito 9b1907
## <param name="role">
Chris PeBenito 9b1907
##	<summary>
Chris PeBenito 9b1907
##	Role allowed access
Chris PeBenito 9b1907
##	</summary>
Chris PeBenito 9b1907
## </param>
Chris PeBenito 9b1907
## <param name="domain">
Chris PeBenito 9b1907
##	<summary>
Chris PeBenito 9b1907
##	User domain for the role
Chris PeBenito 9b1907
##	</summary>
Chris PeBenito 9b1907
## </param>
Chris PeBenito 9b1907
#
Chris PeBenito 9b1907
interface(`pulseaudio_role',`
Chris PeBenito 9b1907
	gen_require(`
Chris PeBenito 9b1907
		type pulseaudio_t, pulseaudio_exec_t, print_spool_t;
Jeremy Solt 186838
		class dbus { acquire_svc send_msg };
Chris PeBenito 9b1907
	')
Chris PeBenito 9b1907
Chris PeBenito 9b1907
	role $1 types pulseaudio_t;
Chris PeBenito 9b1907
Chris PeBenito 9b1907
	# Transition from the user domain to the derived domain.
Chris PeBenito 9b1907
	domtrans_pattern($2, pulseaudio_exec_t, pulseaudio_t)
Chris PeBenito 9b1907
Chris PeBenito 9b1907
	ps_process_pattern($2, pulseaudio_t)
Chris PeBenito 9b1907
Chris PeBenito 9b1907
	allow pulseaudio_t $2:process { signal signull };
Jeremy Solt 186838
	allow $2 pulseaudio_t:process { signal signull sigkill };
Chris PeBenito 9b1907
	ps_process_pattern(pulseaudio_t, $2)
Chris PeBenito 9b1907
Chris PeBenito 9b1907
	allow pulseaudio_t $2:unix_stream_socket connectto;
Chris PeBenito 9b1907
	allow $2 pulseaudio_t:unix_stream_socket connectto;
Chris PeBenito 9b1907
Chris PeBenito 9b1907
	userdom_manage_home_role($1, pulseaudio_t)
Chris PeBenito 9b1907
	userdom_manage_tmp_role($1, pulseaudio_t)
Chris PeBenito 9b1907
	userdom_manage_tmpfs_role($1, pulseaudio_t)
Chris PeBenito 9b1907
Chris PeBenito 9b1907
	allow $2 pulseaudio_t:dbus send_msg;
Jeremy Solt 186838
	allow pulseaudio_t $2:dbus { acquire_svc send_msg };
Chris PeBenito 9b1907
')
Chris PeBenito 9b1907
Chris PeBenito 9b1907
########################################
Chris PeBenito 9b1907
## <summary>
Chris PeBenito 9b1907
##	Execute a domain transition to run pulseaudio.
Chris PeBenito 9b1907
## </summary>
Chris PeBenito 9b1907
## <param name="domain">
Chris PeBenito 9b1907
## <summary>
Chris PeBenito 9b1907
##	Domain allowed to transition.
Chris PeBenito 9b1907
## </summary>
Chris PeBenito 9b1907
## </param>
Chris PeBenito 9b1907
#
Chris PeBenito 9b1907
interface(`pulseaudio_domtrans',`
Chris PeBenito 9b1907
	gen_require(`
Chris PeBenito 9b1907
		type pulseaudio_t, pulseaudio_exec_t;
Chris PeBenito 9b1907
	')
Chris PeBenito 9b1907
Chris PeBenito ad0071
	domtrans_pattern($1, pulseaudio_exec_t, pulseaudio_t)
Chris PeBenito 9b1907
')
Chris PeBenito 9b1907
Chris PeBenito 9b1907
########################################
Chris PeBenito 9b1907
## <summary>
Chris PeBenito 9b1907
##	Execute pulseaudio in the pulseaudio domain, and
Chris PeBenito 9b1907
##	allow the specified role the pulseaudio domain.
Chris PeBenito 9b1907
## </summary>
Chris PeBenito 9b1907
## <param name="domain">
Chris PeBenito 9b1907
##	<summary>
Chris PeBenito 9b1907
##	Domain allowed access.
Chris PeBenito 9b1907
##	</summary>
Chris PeBenito 9b1907
## </param>
Chris PeBenito 9b1907
## <param name="role">
Chris PeBenito 9b1907
##	<summary>
Chris PeBenito 9b1907
##	The role to be allowed the pulseaudio domain.
Chris PeBenito 9b1907
##	</summary>
Chris PeBenito 9b1907
## </param>
Chris PeBenito 9b1907
#
Chris PeBenito 9b1907
interface(`pulseaudio_run',`
Chris PeBenito 9b1907
	gen_require(`
Chris PeBenito 9b1907
		type pulseaudio_t;
Chris PeBenito 9b1907
	')
Chris PeBenito 9b1907
Chris PeBenito 9b1907
	pulseaudio_domtrans($1)
Chris PeBenito 9b1907
	role $2 types pulseaudio_t;
Chris PeBenito 9b1907
')
Chris PeBenito 9b1907
Chris PeBenito 9b1907
########################################
Chris PeBenito 9b1907
## <summary>
Chris PeBenito ad0071
##	Execute a pulseaudio in the current domain.
Chris PeBenito 9b1907
## </summary>
Chris PeBenito 9b1907
## <param name="domain">
Chris PeBenito 9b1907
## <summary>
Chris PeBenito 9b1907
##	Domain allowed to transition.
Chris PeBenito 9b1907
## </summary>
Chris PeBenito 9b1907
## </param>
Chris PeBenito 9b1907
#
Chris PeBenito 9b1907
interface(`pulseaudio_exec',`
Chris PeBenito 9b1907
	gen_require(`
Jeremy Solt 186838
		type pulseaudio_exec_t;
Chris PeBenito 9b1907
	')
Chris PeBenito 9b1907
Chris PeBenito ad0071
	can_exec($1, pulseaudio_exec_t)
Chris PeBenito 9b1907
')
Chris PeBenito 9b1907
Chris PeBenito 1fd3a8
########################################
Chris PeBenito 1fd3a8
## <summary>
Chris PeBenito 1fd3a8
##	Do not audit to execute a pulseaudio.
Chris PeBenito 1fd3a8
## </summary>
Chris PeBenito 1fd3a8
## <param name="domain">
Chris PeBenito 1fd3a8
## <summary>
Chris PeBenito 1fd3a8
##	Domain to not audit.
Chris PeBenito 1fd3a8
## </summary>
Chris PeBenito 1fd3a8
## </param>
Chris PeBenito 1fd3a8
#
Chris PeBenito 1fd3a8
interface(`pulseaudio_dontaudit_exec',`
Chris PeBenito 1fd3a8
	gen_require(`
Chris PeBenito 1fd3a8
		type pulseaudio_exec_t;
Chris PeBenito 1fd3a8
	')
Chris PeBenito 1fd3a8
Chris PeBenito 1fd3a8
	dontaudit $1 pulseaudio_exec_t:file exec_file_perms;
Chris PeBenito 1fd3a8
')
Chris PeBenito 1fd3a8
Chris PeBenito 1fd3a8
########################################
Chris PeBenito 1fd3a8
## <summary>
Chris PeBenito 1fd3a8
##	Send signull signal to pulseaudio
Chris PeBenito 1fd3a8
##	processes.
Chris PeBenito 1fd3a8
## </summary>
Chris PeBenito 1fd3a8
## <param name="domain">
Chris PeBenito 1fd3a8
##	<summary>
Chris PeBenito 1fd3a8
##	Domain allowed access.
Chris PeBenito 1fd3a8
##	</summary>
Chris PeBenito 1fd3a8
## </param>
Chris PeBenito 1fd3a8
#
Chris PeBenito 1fd3a8
interface(`pulseaudio_signull',`
Chris PeBenito 1fd3a8
	gen_require(`
Chris PeBenito 1fd3a8
		type pulseaudio_t;
Chris PeBenito 1fd3a8
	')
Chris PeBenito 1fd3a8
Chris PeBenito 1fd3a8
	allow $1 pulseaudio_t:process signull;
Chris PeBenito 1fd3a8
')
Chris PeBenito 1fd3a8
Chris PeBenito ad0071
#####################################
Chris PeBenito 9b1907
## <summary>
Chris PeBenito ad0071
##	Connect to pulseaudio over a unix domain
Chris PeBenito ad0071
##	stream socket.
Chris PeBenito 9b1907
## </summary>
Chris PeBenito 9b1907
## <param name="domain">
Chris PeBenito 9b1907
##	<summary>
Chris PeBenito 9b1907
##	Domain allowed access.
Chris PeBenito 9b1907
##	</summary>
Chris PeBenito 9b1907
## </param>
Chris PeBenito 9b1907
#
Chris PeBenito ad0071
interface(`pulseaudio_stream_connect',`
Chris PeBenito 9b1907
	gen_require(`
Chris PeBenito ad0071
		type pulseaudio_t, pulseaudio_var_run_t;
Chris PeBenito 9b1907
	')
Chris PeBenito 9b1907
Chris PeBenito ad0071
	files_search_pids($1)
Chris PeBenito ad0071
	allow $1 pulseaudio_t:process signull;
Chris PeBenito ad0071
	allow pulseaudio_t $1:process signull;
Chris PeBenito ad0071
	stream_connect_pattern($1, pulseaudio_var_run_t, pulseaudio_var_run_t, pulseaudio_t)
Chris PeBenito 9b1907
')
Chris PeBenito 9b1907
Chris PeBenito 9b1907
########################################
Chris PeBenito 9b1907
## <summary>
Chris PeBenito ad0071
##	Send and receive messages from
Chris PeBenito ad0071
##	pulseaudio over dbus.
Chris PeBenito 9b1907
## </summary>
Chris PeBenito ad0071
## <param name="domain">
Chris PeBenito 9b1907
##	<summary>
Jeremy Solt 186838
##	Domain allowed access.
Jeremy Solt 186838
##	</summary>
Jeremy Solt 186838
## </param>
Jeremy Solt 186838
#
Chris PeBenito ad0071
interface(`pulseaudio_dbus_chat',`
Jeremy Solt 186838
	gen_require(`
Chris PeBenito ad0071
		type pulseaudio_t;
Chris PeBenito ad0071
		class dbus send_msg;
Jeremy Solt 186838
	')
Jeremy Solt 186838
Chris PeBenito ad0071
	allow $1 pulseaudio_t:dbus send_msg;
Chris PeBenito ad0071
	allow pulseaudio_t $1:dbus send_msg;
Jeremy Solt 186838
')
Jeremy Solt 186838
Jeremy Solt 186838
########################################
Jeremy Solt 186838
## <summary>
Chris PeBenito ad0071
##	Set the attributes of the pulseaudio homedir.
Jeremy Solt 186838
## </summary>
Jeremy Solt 186838
## <param name="user_domain">
Jeremy Solt 186838
##	<summary>
Jeremy Solt 186838
##	Domain allowed access.
Jeremy Solt 186838
##	</summary>
Jeremy Solt 186838
## </param>
Jeremy Solt 186838
#
Chris PeBenito ad0071
interface(`pulseaudio_setattr_home_dir',`
Jeremy Solt 186838
	gen_require(`
Jeremy Solt 186838
		type pulseaudio_home_t;
Jeremy Solt 186838
	')
Jeremy Solt 186838
Chris PeBenito ad0071
	allow $1 pulseaudio_home_t:dir setattr;
Jeremy Solt 186838
')
Jeremy Solt 186838
Jeremy Solt 186838
########################################
Jeremy Solt 186838
## <summary>
Chris PeBenito ad0071
##	Read pulseaudio homedir files.
Jeremy Solt 186838
## </summary>
Jeremy Solt 186838
## <param name="user_domain">
Jeremy Solt 186838
##	<summary>
Jeremy Solt 186838
##	Domain allowed access.
Jeremy Solt 186838
##	</summary>
Jeremy Solt 186838
## </param>
Jeremy Solt 186838
#
Chris PeBenito ad0071
interface(`pulseaudio_read_home_files',`
Jeremy Solt 186838
	gen_require(`
Jeremy Solt 186838
		type pulseaudio_home_t;
Jeremy Solt 186838
	')
Jeremy Solt 186838
Chris PeBenito ad0071
	userdom_search_user_home_dirs($1)
Chris PeBenito ad0071
	read_files_pattern($1, pulseaudio_home_t, pulseaudio_home_t)
Jeremy Solt 186838
')
Jeremy Solt 186838
Chris PeBenito ad0071
########################################
Jeremy Solt 186838
## <summary>
Chris PeBenito 1fd3a8
##	Read and write Pulse Audio files.
Chris PeBenito 1fd3a8
## </summary>
Chris PeBenito 1fd3a8
## <param name="user_domain">
Chris PeBenito 1fd3a8
##	<summary>
Chris PeBenito 1fd3a8
##	Domain allowed access.
Chris PeBenito 1fd3a8
##	</summary>
Chris PeBenito 1fd3a8
## </param>
Chris PeBenito 1fd3a8
#
Chris PeBenito 1fd3a8
interface(`pulseaudio_rw_home_files',`
Chris PeBenito 1fd3a8
	gen_require(`
Chris PeBenito 1fd3a8
		type pulseaudio_home_t;
Chris PeBenito 1fd3a8
	')
Chris PeBenito 1fd3a8
Chris PeBenito 1fd3a8
	rw_files_pattern($1, pulseaudio_home_t, pulseaudio_home_t)
Chris PeBenito 1fd3a8
	userdom_search_user_home_dirs($1)
Chris PeBenito 1fd3a8
')
Chris PeBenito 1fd3a8
Chris PeBenito 1fd3a8
########################################
Chris PeBenito 1fd3a8
## <summary>
Chris PeBenito ad0071
##	Create, read, write, and delete pulseaudio
Chris PeBenito ad0071
##	home directory files.
Jeremy Solt 186838
## </summary>
Chris PeBenito ad0071
## <param name="user_domain">
Jeremy Solt 186838
##	<summary>
Jeremy Solt 186838
##	Domain allowed access.
Chris PeBenito 9b1907
##	</summary>
Chris PeBenito 9b1907
## </param>
Chris PeBenito 9b1907
#
Chris PeBenito ad0071
interface(`pulseaudio_manage_home_files',`
Chris PeBenito 9b1907
	gen_require(`
Chris PeBenito ad0071
		type pulseaudio_home_t;
Chris PeBenito 9b1907
	')
Chris PeBenito 9b1907
Chris PeBenito ad0071
	userdom_search_user_home_dirs($1)
Chris PeBenito ad0071
	manage_files_pattern($1, pulseaudio_home_t, pulseaudio_home_t)
Chris PeBenito 1fd3a8
	read_lnk_files_pattern($1, pulseaudio_home_t, pulseaudio_home_t)
Chris PeBenito 9b1907
')