Dan Walsh 3eaa99
Dan Walsh 3eaa99
## <summary>policy for chrome</summary>
Dan Walsh 3eaa99
Dan Walsh 3eaa99
########################################
Dan Walsh 3eaa99
## <summary>
Dan Walsh 3eaa99
##	Execute a domain transition to run chrome_sandbox.
Dan Walsh 3eaa99
## </summary>
Dan Walsh 3eaa99
## <param name="domain">
Dan Walsh 3eaa99
## <summary>
Dan Walsh 3eaa99
##	Domain allowed to transition.
Dan Walsh 3eaa99
## </summary>
Dan Walsh 3eaa99
## </param>
Dan Walsh 3eaa99
#
Dan Walsh 3eaa99
interface(`chrome_domtrans_sandbox',`
Dan Walsh 3eaa99
	gen_require(`
Dan Walsh 3eaa99
		type chrome_sandbox_t, chrome_sandbox_exec_t;
Dan Walsh 3eaa99
	')
Dan Walsh 3eaa99
Dan Walsh 3eaa99
	domtrans_pattern($1,chrome_sandbox_exec_t,chrome_sandbox_t)
Dan Walsh 3eaa99
	ps_process_pattern(chrome_sandbox_t, $1)
Dan Walsh 3eaa99
ifdef(`hide_broken_symptoms', `
Dan Walsh 3eaa99
	dontaudit chrome_sandbox_t $1:socket_class_set { read write };
Dan Walsh 3eaa99
	fs_dontaudit_rw_anon_inodefs_files(chrome_sandbox_t)
Dan Walsh 3eaa99
')
Dan Walsh 3eaa99
')
Dan Walsh 3eaa99
Dan Walsh 3eaa99
Dan Walsh 3eaa99
########################################
Dan Walsh 3eaa99
## <summary>
Dan Walsh 3eaa99
##	Execute chrome_sandbox in the chrome_sandbox domain, and
Dan Walsh 3eaa99
##	allow the specified role the chrome_sandbox domain.
Dan Walsh 3eaa99
## </summary>
Dan Walsh 3eaa99
## <param name="domain">
Dan Walsh 3eaa99
##	<summary>
Dan Walsh 3eaa99
##	Domain allowed access
Dan Walsh 3eaa99
##	</summary>
Dan Walsh 3eaa99
## </param>
Dan Walsh 3eaa99
## <param name="role">
Dan Walsh 3eaa99
##	<summary>
Dan Walsh 3eaa99
##	The role to be allowed the chrome_sandbox domain.
Dan Walsh 3eaa99
##	</summary>
Dan Walsh 3eaa99
## </param>
Dan Walsh 3eaa99
#
Dan Walsh 3eaa99
interface(`chrome_run_sandbox',`
Dan Walsh 3eaa99
	gen_require(`
Dan Walsh 3eaa99
		type chrome_sandbox_t;
Dan Walsh 3eaa99
	')
Dan Walsh 3eaa99
Dan Walsh 3eaa99
	chrome_domtrans_sandbox($1)
Dan Walsh 3eaa99
	role $2 types chrome_sandbox_t;
Dan Walsh 3eaa99
')
Dan Walsh 3eaa99
Dan Walsh 3eaa99
########################################
Dan Walsh 3eaa99
## <summary>
Dan Walsh 3eaa99
##	Role access for chrome sandbox
Dan Walsh 3eaa99
## </summary>
Dan Walsh 3eaa99
## <param name="role">
Dan Walsh 3eaa99
##	<summary>
Dan Walsh 3eaa99
##	Role allowed access
Dan Walsh 3eaa99
##	</summary>
Dan Walsh 3eaa99
## </param>
Dan Walsh 3eaa99
## <param name="domain">
Dan Walsh 3eaa99
##	<summary>
Dan Walsh 3eaa99
##	User domain for the role
Dan Walsh 3eaa99
##	</summary>
Dan Walsh 3eaa99
## </param>
Dan Walsh 3eaa99
#
Dan Walsh 3eaa99
interface(`chrome_role',`
Dan Walsh 3eaa99
	gen_require(`
Dan Walsh 3eaa99
              type chrome_sandbox_t;
Dan Walsh 3eaa99
              type chrome_sandbox_tmpfs_t;
Dan Walsh 3eaa99
	')
Dan Walsh 3eaa99
Dan Walsh 3eaa99
	role $1 types chrome_sandbox_t;
Dan Walsh 3eaa99
Dan Walsh 3eaa99
	chrome_domtrans_sandbox($2)
Dan Walsh 3eaa99
Dan Walsh 3eaa99
	ps_process_pattern($2, chrome_sandbox_t)
Dan Walsh 3eaa99
	allow $2 chrome_sandbox_t:process signal_perms;
Dan Walsh 3eaa99
Dan Walsh 3eaa99
	allow chrome_sandbox_t $2:unix_dgram_socket { read write };
Dan Walsh 3eaa99
	allow $2 chrome_sandbox_t:unix_dgram_socket { read write };
Dan Walsh 3eaa99
	allow chrome_sandbox_t $2:unix_stream_socket { read write };
Dan Walsh 3eaa99
	allow $2 chrome_sandbox_t:unix_stream_socket { read write };
Dan Walsh 3eaa99
Dan Walsh 3eaa99
	allow $2 chrome_sandbox_t:shm rw_shm_perms;
Dan Walsh 3eaa99
Dan Walsh 3eaa99
	allow $2 chrome_sandbox_tmpfs_t:file rw_file_perms;
Dan Walsh 3eaa99
')
Dan Walsh 3eaa99