Chris PeBenito 17de1b
## <summary>Filesystem automounter service.</summary>
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute automount in the automount domain.
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(`automount_domtrans',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type automount_t, automount_exec_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 8021cb
	corecmd_search_bin($1)
Chris PeBenito c0868a
	domtrans_pattern($1, automount_exec_t, automount_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute automount in the caller domain.
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(`automount_exec_config',`
Chris PeBenito aa7c46
	refpolicywarn(`$0(): has been deprecated, please use files_exec_etc_files() instead.')
Chris PeBenito aa7c46
	files_exec_etc_files($1)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Allow the domain to read state files in /proc.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain to allow access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`automount_read_state',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type automount_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 0bfccd
	read_files_pattern($1, automount_t, automount_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 967fd1
##	Do not audit attempts to file descriptors for automount.
Chris PeBenito 967fd1
## </summary>
Chris PeBenito 967fd1
## <param name="domain">
Chris PeBenito 967fd1
##	<summary>
Chris PeBenito 967fd1
##	Domain to not audit.
Chris PeBenito 967fd1
##	</summary>
Chris PeBenito 967fd1
## </param>
Chris PeBenito 967fd1
#
Chris PeBenito 967fd1
interface(`automount_dontaudit_use_fds',`
Chris PeBenito 967fd1
	gen_require(`
Chris PeBenito 967fd1
		type automount_t;
Chris PeBenito 967fd1
	')
Chris PeBenito 967fd1
Chris PeBenito 967fd1
	dontaudit $1 automount_t:fd use;
Chris PeBenito 967fd1
')
Chris PeBenito 967fd1
Chris PeBenito 967fd1
########################################
Chris PeBenito 967fd1
## <summary>
Chris PeBenito 967fd1
##	Do not audit attempts to write automount daemon unnamed pipes.
Chris PeBenito 967fd1
## </summary>
Chris PeBenito 967fd1
## <param name="domain">
Chris PeBenito 967fd1
##	<summary>
Chris PeBenito 967fd1
##	Domain allowed access.
Chris PeBenito 967fd1
##	</summary>
Chris PeBenito 967fd1
## </param>
Chris PeBenito 967fd1
#
Chris PeBenito 967fd1
interface(`automount_dontaudit_write_pipes',`
Chris PeBenito 967fd1
	gen_require(`
Chris PeBenito 967fd1
		type automount_t;
Chris PeBenito 967fd1
	')
Chris PeBenito 967fd1
Chris PeBenito 967fd1
	dontaudit $1 automount_t:fifo_file write;
Chris PeBenito 967fd1
')
Chris PeBenito 967fd1
Chris PeBenito 967fd1
########################################
Chris PeBenito 967fd1
## <summary>
Chris PeBenito 17de1b
##	Do not audit attempts to get the attributes
Chris PeBenito 17de1b
##	of automount temporary directories.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain to not audit.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`automount_dontaudit_getattr_tmp_dirs',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type automount_tmp_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	dontaudit $1 automount_tmp_t:dir getattr;
Chris PeBenito 17de1b
')
Chris PeBenito 967fd1
Chris PeBenito 967fd1
########################################
Chris PeBenito 967fd1
## <summary>
Chris PeBenito 967fd1
##	All of the rules required to administrate 
Chris PeBenito 967fd1
##	an automount environment
Chris PeBenito 967fd1
## </summary>
Chris PeBenito 967fd1
## <param name="domain">
Chris PeBenito 967fd1
##	<summary>
Chris PeBenito 967fd1
##	Domain allowed access.
Chris PeBenito 967fd1
##	</summary>
Chris PeBenito 967fd1
## </param>
Chris PeBenito 967fd1
## <param name="role">
Chris PeBenito 967fd1
##	<summary>
Chris PeBenito 967fd1
##	The role to be allowed to manage the automount domain.
Chris PeBenito 967fd1
##	</summary>
Chris PeBenito 967fd1
## </param>
Chris PeBenito 967fd1
## <rolecap/>
Chris PeBenito 967fd1
#
Chris PeBenito 967fd1
interface(`automount_admin',`
Chris PeBenito 967fd1
	gen_require(`
Chris PeBenito 967fd1
		type automount_t, automount_lock_t, automount_tmp_t;
Chris PeBenito 967fd1
		type automount_var_run_t, automount_initrc_exec_t;
Chris PeBenito 967fd1
	')
Chris PeBenito 967fd1
Chris PeBenito 967fd1
	allow $1 automount_t:process { ptrace signal_perms getattr };
Chris PeBenito 967fd1
	ps_process_pattern($1, automount_t)
Chris PeBenito 967fd1
Chris PeBenito 967fd1
	init_labeled_script_domtrans($1, automount_initrc_exec_t)
Chris PeBenito 967fd1
	domain_system_change_exemption($1)
Chris PeBenito 967fd1
	role_transition $2 automount_initrc_exec_t system_r;
Chris PeBenito 967fd1
	allow $2 system_r;
Chris PeBenito 967fd1
Chris PeBenito 967fd1
	files_list_var($1)
Chris PeBenito 967fd1
	admin_pattern($1, automount_lock_t)
Chris PeBenito 967fd1
Chris PeBenito 967fd1
	files_list_tmp($1)
Chris PeBenito 967fd1
	admin_pattern($1, automount_tmp_t)
Chris PeBenito 967fd1
Chris PeBenito 967fd1
	files_list_pids($1)
Chris PeBenito 967fd1
	admin_pattern($1, automount_var_run_t)
Chris PeBenito 967fd1
')