Chris PeBenito e9c6cd
## <summary>General system administration role</summary>
Chris PeBenito e9c6cd
Chris PeBenito e9c6cd
########################################
Chris PeBenito e9c6cd
## <summary>
Chris PeBenito e9c6cd
##	Change to the generic user role.
Chris PeBenito e9c6cd
## </summary>
Chris PeBenito e9c6cd
## <param name="prefix">
Chris PeBenito e9c6cd
##	<summary>
Chris PeBenito e9c6cd
##	The prefix of the user role (e.g., user
Chris PeBenito e9c6cd
##	is the prefix for user_r).
Chris PeBenito e9c6cd
##	</summary>
Chris PeBenito e9c6cd
## </param>
Chris PeBenito e9c6cd
## <rolecap/>
Chris PeBenito e9c6cd
#
Chris PeBenito e9c6cd
template(`sysadm_role_change_template',`
Chris PeBenito e9c6cd
	userdom_role_change_template($1, sysadm)
Chris PeBenito e9c6cd
')
Chris PeBenito e9c6cd
Chris PeBenito e9c6cd
########################################
Chris PeBenito e9c6cd
## <summary>
Chris PeBenito e9c6cd
##	Change from the generic user role.
Chris PeBenito e9c6cd
## </summary>
Chris PeBenito e9c6cd
## <desc>
Chris PeBenito e9c6cd
##	

Chris PeBenito e9c6cd
##	Change from the generic user role to
Chris PeBenito e9c6cd
##	the specified role.
Chris PeBenito e9c6cd
##	

Chris PeBenito e9c6cd
##	

Chris PeBenito e9c6cd
##	This is a template to support third party modules
Chris PeBenito e9c6cd
##	and its use is not allowed in upstream reference
Chris PeBenito e9c6cd
##	policy.
Chris PeBenito e9c6cd
##	

Chris PeBenito e9c6cd
## </desc>
Chris PeBenito e9c6cd
## <param name="prefix">
Chris PeBenito e9c6cd
##	<summary>
Chris PeBenito e9c6cd
##	The prefix of the user role (e.g., user
Chris PeBenito e9c6cd
##	is the prefix for user_r).
Chris PeBenito e9c6cd
##	</summary>
Chris PeBenito e9c6cd
## </param>
Chris PeBenito e9c6cd
## <rolecap/>
Chris PeBenito e9c6cd
#
Chris PeBenito e9c6cd
template(`sysadm_role_change_to_template',`
Chris PeBenito e9c6cd
	userdom_role_change_template(sysadm, $1)
Chris PeBenito e9c6cd
')
Chris PeBenito e9c6cd
Chris PeBenito e9c6cd
########################################
Chris PeBenito e9c6cd
## <summary>
Chris PeBenito e9c6cd
##	Execute a shell in the sysadm domain.
Chris PeBenito e9c6cd
## </summary>
Chris PeBenito e9c6cd
## <param name="domain">
Chris PeBenito e9c6cd
##	<summary>
Chris PeBenito e9c6cd
##	Domain allowed access.
Chris PeBenito e9c6cd
##	</summary>
Chris PeBenito e9c6cd
## </param>
Chris PeBenito e9c6cd
#
Chris PeBenito e9c6cd
interface(`sysadm_shell_domtrans',`
Chris PeBenito e9c6cd
	gen_require(`
Chris PeBenito e9c6cd
		type sysadm_t;
Chris PeBenito e9c6cd
	')
Chris PeBenito e9c6cd
Chris PeBenito e9c6cd
	corecmd_shell_domtrans($1, sysadm_t)
Chris PeBenito e9c6cd
	allow sysadm_t $1:fd use;
Chris PeBenito e9c6cd
	allow sysadm_t $1:fifo_file rw_file_perms;
Chris PeBenito e9c6cd
	allow sysadm_t $1:process sigchld;
Chris PeBenito e9c6cd
')
Chris PeBenito e9c6cd
Chris PeBenito e9c6cd
########################################
Chris PeBenito e9c6cd
## <summary>
Chris PeBenito e9c6cd
##	Execute a generic bin program in the sysadm domain.
Chris PeBenito e9c6cd
## </summary>
Chris PeBenito e9c6cd
## <param name="domain">
Chris PeBenito e9c6cd
##	<summary>
Chris PeBenito e9c6cd
##	Domain allowed access.
Chris PeBenito e9c6cd
##	</summary>
Chris PeBenito e9c6cd
## </param>
Chris PeBenito e9c6cd
#
Chris PeBenito e9c6cd
interface(`sysadm_bin_spec_domtrans',`
Chris PeBenito e9c6cd
	gen_require(`
Chris PeBenito e9c6cd
		type sysadm_t;
Chris PeBenito e9c6cd
	')
Chris PeBenito e9c6cd
Chris PeBenito e9c6cd
	corecmd_bin_spec_domtrans($1, sysadm_t)
Chris PeBenito e9c6cd
	allow sysadm_t $1:fd use;
Chris PeBenito e9c6cd
	allow sysadm_t $1:fifo_file rw_file_perms;
Chris PeBenito e9c6cd
	allow sysadm_t $1:process sigchld;
Chris PeBenito e9c6cd
')
Chris PeBenito e9c6cd
Chris PeBenito e9c6cd
########################################
Chris PeBenito e9c6cd
## <summary>
Chris PeBenito e9c6cd
##	Execute all entrypoint files in the sysadm domain. This
Chris PeBenito e9c6cd
##	is an explicit transition, requiring the
Chris PeBenito e9c6cd
##	caller to use setexeccon().
Chris PeBenito e9c6cd
## </summary>
Chris PeBenito e9c6cd
## <param name="domain">
Chris PeBenito e9c6cd
##	<summary>
Chris PeBenito e9c6cd
##	Domain allowed access.
Chris PeBenito e9c6cd
##	</summary>
Chris PeBenito e9c6cd
## </param>
Chris PeBenito e9c6cd
#
Chris PeBenito e9c6cd
interface(`sysadm_entry_spec_domtrans',`
Chris PeBenito e9c6cd
	gen_require(`
Chris PeBenito e9c6cd
		type sysadm_t;
Chris PeBenito e9c6cd
	')
Chris PeBenito e9c6cd
Chris PeBenito e9c6cd
	domain_entry_file_spec_domtrans($1, sysadm_t)
Chris PeBenito e9c6cd
	allow sysadm_t $1:fd use;
Chris PeBenito e9c6cd
	allow sysadm_t $1:fifo_file rw_file_perms;
Chris PeBenito e9c6cd
	allow sysadm_t $1:process sigchld;
Chris PeBenito e9c6cd
')
Chris PeBenito e9c6cd
Chris PeBenito e9c6cd
########################################
Chris PeBenito e9c6cd
## <summary>
Chris PeBenito e9c6cd
##	Allow sysadm to execute a generic bin program in
Chris PeBenito e9c6cd
##	a specified domain.  This is an explicit transition,
Chris PeBenito e9c6cd
##	requiring the caller to use setexeccon().
Chris PeBenito e9c6cd
## </summary>
Chris PeBenito e9c6cd
## <desc>
Chris PeBenito e9c6cd
##	

Chris PeBenito e9c6cd
##	Allow sysadm to execute a generic bin program in
Chris PeBenito e9c6cd
##	a specified domain.
Chris PeBenito e9c6cd
##	

Chris PeBenito e9c6cd
##	

Chris PeBenito e9c6cd
##	This is a interface to support third party modules
Chris PeBenito e9c6cd
##	and its use is not allowed in upstream reference
Chris PeBenito e9c6cd
##	policy.
Chris PeBenito e9c6cd
##	

Chris PeBenito e9c6cd
## </desc>
Chris PeBenito e9c6cd
## <param name="domain">
Chris PeBenito e9c6cd
##	<summary>
Chris PeBenito e9c6cd
##	Domain to execute in.
Chris PeBenito e9c6cd
##	</summary>
Chris PeBenito e9c6cd
## </param>
Chris PeBenito e9c6cd
#
Chris PeBenito e9c6cd
interface(`sysadm_bin_spec_domtrans_to',`
Chris PeBenito e9c6cd
	gen_require(`
Chris PeBenito e9c6cd
		type sysadm_t;
Chris PeBenito e9c6cd
	')
Chris PeBenito e9c6cd
Chris PeBenito e9c6cd
	corecmd_bin_spec_domtrans(sysadm_t, $1)
Chris PeBenito e9c6cd
	allow $1 sysadm_t:fd use;
Chris PeBenito e9c6cd
	allow $1 sysadm_t:fifo_file rw_file_perms;
Chris PeBenito e9c6cd
	allow $1 sysadm_t:process sigchld;
Chris PeBenito e9c6cd
')
Chris PeBenito e9c6cd
Chris PeBenito e9c6cd
########################################
Chris PeBenito e9c6cd
## <summary>
Chris PeBenito e9c6cd
##	Send a SIGCHLD signal to sysadm users.
Chris PeBenito e9c6cd
## </summary>
Chris PeBenito e9c6cd
## <param name="domain">
Chris PeBenito e9c6cd
##	<summary>
Chris PeBenito e9c6cd
##	Domain allowed access.
Chris PeBenito e9c6cd
##	</summary>
Chris PeBenito e9c6cd
## </param>
Chris PeBenito e9c6cd
#
Chris PeBenito e9c6cd
interface(`sysadm_sigchld',`
Chris PeBenito e9c6cd
	gen_require(`
Chris PeBenito e9c6cd
		type sysadm_t;
Chris PeBenito e9c6cd
	')
Chris PeBenito e9c6cd
Chris PeBenito e9c6cd
	allow $1 sysadm_t:process sigchld;
Chris PeBenito e9c6cd
')
Chris PeBenito e9c6cd
Chris PeBenito e9c6cd
########################################
Chris PeBenito e9c6cd
## <summary>
Chris PeBenito e9c6cd
##	Inherit and use sysadm file descriptors
Chris PeBenito e9c6cd
## </summary>
Chris PeBenito e9c6cd
## <param name="domain">
Chris PeBenito e9c6cd
##	<summary>
Chris PeBenito e9c6cd
##	Domain allowed access.
Chris PeBenito e9c6cd
##	</summary>
Chris PeBenito e9c6cd
## </param>
Chris PeBenito e9c6cd
#
Chris PeBenito e9c6cd
interface(`sysadm_use_fds',`
Chris PeBenito e9c6cd
	gen_require(`
Chris PeBenito e9c6cd
		type sysadm_t;
Chris PeBenito e9c6cd
	')
Chris PeBenito e9c6cd
Chris PeBenito e9c6cd
	allow $1 sysadm_t:fd use;
Chris PeBenito e9c6cd
')
Chris PeBenito e9c6cd
Chris PeBenito e9c6cd
########################################
Chris PeBenito e9c6cd
## <summary>
Chris PeBenito e9c6cd
##	Read and write sysadm user unnamed pipes.
Chris PeBenito e9c6cd
## </summary>
Chris PeBenito e9c6cd
## <param name="domain">
Chris PeBenito e9c6cd
##	<summary>
Chris PeBenito e9c6cd
##	Domain allowed access.
Chris PeBenito e9c6cd
##	</summary>
Chris PeBenito e9c6cd
## </param>
Chris PeBenito e9c6cd
#
Chris PeBenito e9c6cd
interface(`sysadm_rw_pipes',`
Chris PeBenito e9c6cd
	gen_require(`
Chris PeBenito e9c6cd
		type sysadm_t;
Chris PeBenito e9c6cd
	')
Chris PeBenito e9c6cd
Chris PeBenito e9c6cd
	allow $1 sysadm_t:fifo_file rw_fifo_file_perms;
Chris PeBenito e9c6cd
')
Chris PeBenito e9c6cd
Chris PeBenito e9c6cd
########################################
Chris PeBenito e9c6cd
## <summary>
Chris PeBenito e9c6cd
##	Do not audit attepts to get the attributes
Chris PeBenito e9c6cd
##	of sysadm ttys.
Chris PeBenito e9c6cd
## </summary>
Chris PeBenito e9c6cd
## <param name="domain">
Chris PeBenito e9c6cd
##	<summary>
Chris PeBenito e9c6cd
##	Domain allowed access.
Chris PeBenito e9c6cd
##	</summary>
Chris PeBenito e9c6cd
## </param>
Chris PeBenito e9c6cd
#
Chris PeBenito e9c6cd
interface(`sysadm_dontaudit_getattr_ttys',`
Chris PeBenito e9c6cd
	gen_require(`
Chris PeBenito e9c6cd
		type sysadm_tty_device_t;
Chris PeBenito e9c6cd
	')
Chris PeBenito e9c6cd
Chris PeBenito e9c6cd
	dontaudit $1 sysadm_tty_device_t:chr_file getattr;
Chris PeBenito e9c6cd
')
Chris PeBenito e9c6cd
Chris PeBenito e9c6cd
########################################
Chris PeBenito e9c6cd
## <summary>
Chris PeBenito e9c6cd
##	Read and write sysadm ttys.
Chris PeBenito e9c6cd
## </summary>
Chris PeBenito e9c6cd
## <param name="domain">
Chris PeBenito e9c6cd
##	<summary>
Chris PeBenito e9c6cd
##	Domain allowed access.
Chris PeBenito e9c6cd
##	</summary>
Chris PeBenito e9c6cd
## </param>
Chris PeBenito e9c6cd
#
Chris PeBenito e9c6cd
interface(`sysadm_use_ttys',`
Chris PeBenito e9c6cd
	gen_require(`
Chris PeBenito e9c6cd
		type sysadm_tty_device_t;
Chris PeBenito e9c6cd
	')
Chris PeBenito e9c6cd
Chris PeBenito e9c6cd
	dev_list_all_dev_nodes($1)
Chris PeBenito e9c6cd
	term_list_ptys($1)
Chris PeBenito e9c6cd
	allow $1 sysadm_tty_device_t:chr_file rw_term_perms;
Chris PeBenito e9c6cd
')
Chris PeBenito e9c6cd
Chris PeBenito e9c6cd
########################################
Chris PeBenito e9c6cd
## <summary>
Chris PeBenito e9c6cd
##	Do not audit attempts to use sysadm ttys.
Chris PeBenito e9c6cd
## </summary>
Chris PeBenito e9c6cd
## <param name="domain">
Chris PeBenito e9c6cd
##	<summary>
Chris PeBenito e9c6cd
##	Domain to not audit.
Chris PeBenito e9c6cd
##	</summary>
Chris PeBenito e9c6cd
## </param>
Chris PeBenito e9c6cd
#
Chris PeBenito e9c6cd
interface(`sysadm_dontaudit_use_ttys',`
Chris PeBenito e9c6cd
	gen_require(`
Chris PeBenito e9c6cd
		type sysadm_tty_device_t;
Chris PeBenito e9c6cd
	')
Chris PeBenito e9c6cd
Chris PeBenito e9c6cd
	dontaudit $1 sysadm_tty_device_t:chr_file { read write };
Chris PeBenito e9c6cd
')
Chris PeBenito e9c6cd
Chris PeBenito e9c6cd
########################################
Chris PeBenito e9c6cd
## <summary>
Chris PeBenito e9c6cd
##	Read and write sysadm ptys.
Chris PeBenito e9c6cd
## </summary>
Chris PeBenito e9c6cd
## <param name="domain">
Chris PeBenito e9c6cd
##	<summary>
Chris PeBenito e9c6cd
##	Domain allowed access.
Chris PeBenito e9c6cd
##	</summary>
Chris PeBenito e9c6cd
## </param>
Chris PeBenito e9c6cd
#
Chris PeBenito e9c6cd
interface(`sysadm_use_ptys',`
Chris PeBenito e9c6cd
	gen_require(`
Chris PeBenito e9c6cd
		type sysadm_devpts_t;
Chris PeBenito e9c6cd
	')
Chris PeBenito e9c6cd
Chris PeBenito e9c6cd
	dev_list_all_dev_nodes($1)
Chris PeBenito e9c6cd
	term_list_ptys($1)
Chris PeBenito e9c6cd
	allow $1 sysadm_devpts_t:chr_file rw_term_perms;
Chris PeBenito e9c6cd
')
Chris PeBenito e9c6cd
Chris PeBenito e9c6cd
########################################
Chris PeBenito e9c6cd
## <summary>
Chris PeBenito e9c6cd
##	Dont audit attempts to read and write sysadm ptys.
Chris PeBenito e9c6cd
## </summary>
Chris PeBenito e9c6cd
## <param name="domain">
Chris PeBenito e9c6cd
##	<summary>
Chris PeBenito e9c6cd
##	Domain to not audit.
Chris PeBenito e9c6cd
##	</summary>
Chris PeBenito e9c6cd
## </param>
Chris PeBenito e9c6cd
#
Chris PeBenito e9c6cd
interface(`sysadm_dontaudit_use_ptys',`
Chris PeBenito e9c6cd
	gen_require(`
Chris PeBenito e9c6cd
		type sysadm_devpts_t;
Chris PeBenito e9c6cd
	')
Chris PeBenito e9c6cd
Chris PeBenito e9c6cd
	dontaudit $1 sysadm_devpts_t:chr_file { read write };
Chris PeBenito e9c6cd
')
Chris PeBenito e9c6cd
Chris PeBenito e9c6cd
########################################
Chris PeBenito e9c6cd
## <summary>
Chris PeBenito e9c6cd
##	Read and write sysadm ttys and ptys.
Chris PeBenito e9c6cd
## </summary>
Chris PeBenito e9c6cd
## <param name="domain">
Chris PeBenito e9c6cd
##	<summary>
Chris PeBenito e9c6cd
##	Domain allowed access.
Chris PeBenito e9c6cd
##	</summary>
Chris PeBenito e9c6cd
## </param>
Chris PeBenito e9c6cd
#
Chris PeBenito e9c6cd
interface(`sysadm_use_terms',`
Chris PeBenito e9c6cd
	sysadm_use_ttys($1)
Chris PeBenito e9c6cd
	sysadm_use_ptys($1)
Chris PeBenito e9c6cd
')
Chris PeBenito e9c6cd
Chris PeBenito e9c6cd
########################################
Chris PeBenito e9c6cd
## <summary>
Chris PeBenito e9c6cd
##	Do not audit attempts to use sysadm ttys and ptys.
Chris PeBenito e9c6cd
## </summary>
Chris PeBenito e9c6cd
## <param name="domain">
Chris PeBenito e9c6cd
##	<summary>
Chris PeBenito e9c6cd
##	Domain to not audit.
Chris PeBenito e9c6cd
##	</summary>
Chris PeBenito e9c6cd
## </param>
Chris PeBenito e9c6cd
#
Chris PeBenito e9c6cd
interface(`sysadm_dontaudit_use_terms',`
Chris PeBenito e9c6cd
	sysadm_dontaudit_use_ttys($1)
Chris PeBenito e9c6cd
	sysadm_dontaudit_use_ptys($1)
Chris PeBenito e9c6cd
')
Chris PeBenito e9c6cd
Chris PeBenito e9c6cd
########################################
Chris PeBenito e9c6cd
## <summary>
Chris PeBenito e9c6cd
##	Get the attributes of the sysadm users
Chris PeBenito e9c6cd
##	home directory.
Chris PeBenito e9c6cd
## </summary>
Chris PeBenito e9c6cd
## <param name="domain">
Chris PeBenito e9c6cd
##	<summary>
Chris PeBenito e9c6cd
##	Domain allowed access.
Chris PeBenito e9c6cd
##	</summary>
Chris PeBenito e9c6cd
## </param>
Chris PeBenito e9c6cd
#
Chris PeBenito e9c6cd
interface(`sysadm_getattr_home_dirs',`
Chris PeBenito e9c6cd
	gen_require(`
Chris PeBenito e9c6cd
		type sysadm_home_dir_t;
Chris PeBenito e9c6cd
	')
Chris PeBenito e9c6cd
Chris PeBenito e9c6cd
	allow $1 sysadm_home_dir_t:dir getattr;
Chris PeBenito e9c6cd
')
Chris PeBenito e9c6cd
Chris PeBenito e9c6cd
########################################
Chris PeBenito e9c6cd
## <summary>
Chris PeBenito e9c6cd
##	Do not audit attempts to get the
Chris PeBenito e9c6cd
##	attributes of the sysadm users
Chris PeBenito e9c6cd
##	home directory.
Chris PeBenito e9c6cd
## </summary>
Chris PeBenito e9c6cd
## <param name="domain">
Chris PeBenito e9c6cd
##	<summary>
Chris PeBenito e9c6cd
##	Domain to not audit.
Chris PeBenito e9c6cd
##	</summary>
Chris PeBenito e9c6cd
## </param>
Chris PeBenito e9c6cd
#
Chris PeBenito e9c6cd
interface(`sysadm_dontaudit_getattr_home_dirs',`
Chris PeBenito e9c6cd
	gen_require(`
Chris PeBenito e9c6cd
		type sysadm_home_dir_t;
Chris PeBenito e9c6cd
	')
Chris PeBenito e9c6cd
Chris PeBenito e9c6cd
	dontaudit $1 sysadm_home_dir_t:dir getattr;
Chris PeBenito e9c6cd
')
Chris PeBenito e9c6cd
Chris PeBenito e9c6cd
########################################
Chris PeBenito e9c6cd
## <summary>
Chris PeBenito e9c6cd
##	Search the sysadm users home directory.
Chris PeBenito e9c6cd
## </summary>
Chris PeBenito e9c6cd
## <param name="domain">
Chris PeBenito e9c6cd
##	<summary>
Chris PeBenito e9c6cd
##	Domain to not audit.
Chris PeBenito e9c6cd
##	</summary>
Chris PeBenito e9c6cd
## </param>
Chris PeBenito e9c6cd
#
Chris PeBenito e9c6cd
interface(`sysadm_search_home_dirs',`
Chris PeBenito e9c6cd
	gen_require(`
Chris PeBenito e9c6cd
		type sysadm_home_dir_t;
Chris PeBenito e9c6cd
	')
Chris PeBenito e9c6cd
Chris PeBenito e9c6cd
	allow $1 sysadm_home_dir_t:dir search_dir_perms;
Chris PeBenito e9c6cd
')
Chris PeBenito e9c6cd
Chris PeBenito e9c6cd
########################################
Chris PeBenito e9c6cd
## <summary>
Chris PeBenito e9c6cd
##	Do not audit attempts to search the sysadm
Chris PeBenito e9c6cd
##	users home directory.
Chris PeBenito e9c6cd
## </summary>
Chris PeBenito e9c6cd
## <param name="domain">
Chris PeBenito e9c6cd
##	<summary>
Chris PeBenito e9c6cd
##	Domain to not audit.
Chris PeBenito e9c6cd
##	</summary>
Chris PeBenito e9c6cd
## </param>
Chris PeBenito e9c6cd
#
Chris PeBenito e9c6cd
interface(`sysadm_dontaudit_search_home_dirs',`
Chris PeBenito e9c6cd
	gen_require(`
Chris PeBenito e9c6cd
		type sysadm_home_dir_t;
Chris PeBenito e9c6cd
	')
Chris PeBenito e9c6cd
Chris PeBenito e9c6cd
	dontaudit $1 sysadm_home_dir_t:dir search_dir_perms;
Chris PeBenito e9c6cd
')
Chris PeBenito e9c6cd
Chris PeBenito e9c6cd
########################################
Chris PeBenito e9c6cd
## <summary>
Chris PeBenito e9c6cd
##	List the sysadm users home directory.
Chris PeBenito e9c6cd
## </summary>
Chris PeBenito e9c6cd
## <param name="domain">
Chris PeBenito e9c6cd
##	<summary>
Chris PeBenito e9c6cd
##	Domain allowed access.
Chris PeBenito e9c6cd
##	</summary>
Chris PeBenito e9c6cd
## </param>
Chris PeBenito e9c6cd
#
Chris PeBenito e9c6cd
interface(`sysadm_list_home_dirs',`
Chris PeBenito e9c6cd
	gen_require(`
Chris PeBenito e9c6cd
		type sysadm_home_dir_t;
Chris PeBenito e9c6cd
	')
Chris PeBenito e9c6cd
Chris PeBenito e9c6cd
	allow $1 sysadm_home_dir_t:dir list_dir_perms;
Chris PeBenito e9c6cd
')
Chris PeBenito e9c6cd
Chris PeBenito e9c6cd
########################################
Chris PeBenito e9c6cd
## <summary>
Chris PeBenito e9c6cd
##	Do not audit attempts to list the sysadm
Chris PeBenito e9c6cd
##	users home directory.
Chris PeBenito e9c6cd
## </summary>
Chris PeBenito e9c6cd
## <param name="domain">
Chris PeBenito e9c6cd
##	<summary>
Chris PeBenito e9c6cd
##	Domain to not audit.
Chris PeBenito e9c6cd
##	</summary>
Chris PeBenito e9c6cd
## </param>
Chris PeBenito e9c6cd
#
Chris PeBenito e9c6cd
interface(`sysadm_dontaudit_list_home_dirs',`
Chris PeBenito e9c6cd
	gen_require(`
Chris PeBenito e9c6cd
		type sysadm_home_dir_t;
Chris PeBenito e9c6cd
	')
Chris PeBenito e9c6cd
Chris PeBenito e9c6cd
	dontaudit $1 sysadm_home_dir_t:dir list_dir_perms;
Chris PeBenito e9c6cd
')
Chris PeBenito e9c6cd
Chris PeBenito e9c6cd
########################################
Chris PeBenito e9c6cd
## <summary>
Chris PeBenito e9c6cd
##	Create objects in sysadm home directories
Chris PeBenito e9c6cd
##	with automatic file type transition.
Chris PeBenito e9c6cd
## </summary>
Chris PeBenito e9c6cd
## <param name="domain">
Chris PeBenito e9c6cd
##	<summary>
Chris PeBenito e9c6cd
##	Domain allowed access.
Chris PeBenito e9c6cd
##	</summary>
Chris PeBenito e9c6cd
## </param>
Chris PeBenito e9c6cd
## <param name="private type">
Chris PeBenito e9c6cd
##	<summary>
Chris PeBenito e9c6cd
##	The type of the object to be created.
Chris PeBenito e9c6cd
##	</summary>
Chris PeBenito e9c6cd
## </param>
Chris PeBenito e9c6cd
## <param name="object_class">
Chris PeBenito e9c6cd
##	<summary>
Chris PeBenito e9c6cd
##	The class of the object to be created.
Chris PeBenito e9c6cd
##	If not specified, file is used.
Chris PeBenito e9c6cd
##	</summary>
Chris PeBenito e9c6cd
## </param>
Chris PeBenito e9c6cd
#
Chris PeBenito e9c6cd
interface(`sysadm_home_dir_filetrans',`
Chris PeBenito e9c6cd
	gen_require(`
Chris PeBenito e9c6cd
		type sysadm_home_dir_t;
Chris PeBenito e9c6cd
	')
Chris PeBenito e9c6cd
Chris PeBenito e9c6cd
	filetrans_pattern($1, sysadm_home_dir_t, $2, $3)
Chris PeBenito e9c6cd
')
Chris PeBenito e9c6cd
Chris PeBenito e9c6cd
########################################
Chris PeBenito e9c6cd
## <summary>
Chris PeBenito e9c6cd
##	Search the sysadm users home sub directories.
Chris PeBenito e9c6cd
## </summary>
Chris PeBenito e9c6cd
## <param name="domain">
Chris PeBenito e9c6cd
##	<summary>
Chris PeBenito e9c6cd
##	Domain to not audit.
Chris PeBenito e9c6cd
##	</summary>
Chris PeBenito e9c6cd
## </param>
Chris PeBenito e9c6cd
#
Chris PeBenito e9c6cd
interface(`sysadm_search_home_content_dirs',`
Chris PeBenito e9c6cd
	gen_require(`
Chris PeBenito e9c6cd
		type sysadm_home_dir_t, sysadm_home_t;
Chris PeBenito e9c6cd
	')
Chris PeBenito e9c6cd
Chris PeBenito e9c6cd
	allow $1 { sysadm_home_dir_t sysadm_home_t }:dir search_dir_perms;
Chris PeBenito e9c6cd
')
Chris PeBenito e9c6cd
Chris PeBenito e9c6cd
########################################
Chris PeBenito e9c6cd
## <summary>
Chris PeBenito e9c6cd
##	Read files in the sysadm home directory.
Chris PeBenito e9c6cd
## </summary>
Chris PeBenito e9c6cd
## <param name="domain">
Chris PeBenito e9c6cd
##	<summary>
Chris PeBenito e9c6cd
##	Domain allowed access.
Chris PeBenito e9c6cd
##	</summary>
Chris PeBenito e9c6cd
## </param>
Chris PeBenito e9c6cd
#
Chris PeBenito e9c6cd
interface(`sysadm_read_home_content_files',`
Chris PeBenito e9c6cd
	gen_require(`
Chris PeBenito e9c6cd
		type sysadm_home_dir_t, sysadm_home_t;
Chris PeBenito e9c6cd
	')
Chris PeBenito e9c6cd
Chris PeBenito e9c6cd
	files_search_home($1)
Chris PeBenito e9c6cd
	allow $1 { sysadm_home_dir_t sysadm_home_t }:dir list_dir_perms;
Chris PeBenito e9c6cd
	read_files_pattern($1, { sysadm_home_dir_t sysadm_home_t }, sysadm_home_t)
Chris PeBenito e9c6cd
	read_lnk_files_pattern($1, { sysadm_home_dir_t sysadm_home_t }, sysadm_home_t)
Chris PeBenito e9c6cd
')
Chris PeBenito e9c6cd
Chris PeBenito e9c6cd
########################################
Chris PeBenito e9c6cd
## <summary>
Chris PeBenito e9c6cd
##	Do not audit attempts to read files in the sysadm
Chris PeBenito e9c6cd
##	home directory.
Chris PeBenito e9c6cd
## </summary>
Chris PeBenito e9c6cd
## <param name="domain">
Chris PeBenito e9c6cd
##	<summary>
Chris PeBenito e9c6cd
##	Domain to not audit.
Chris PeBenito e9c6cd
##	</summary>
Chris PeBenito e9c6cd
## </param>
Chris PeBenito e9c6cd
#
Chris PeBenito e9c6cd
interface(`sysadm_dontaudit_read_home_content_files',`
Chris PeBenito e9c6cd
	gen_require(`
Chris PeBenito e9c6cd
		type sysadm_home_dir_t, sysadm_home_t;
Chris PeBenito e9c6cd
	')
Chris PeBenito e9c6cd
Chris PeBenito e9c6cd
	dontaudit $1 sysadm_home_dir_t:dir search_dir_perms;
Chris PeBenito e9c6cd
	dontaudit $1 sysadm_home_t:dir search_dir_perms;
Chris PeBenito e9c6cd
	dontaudit $1 sysadm_home_t:file read_file_perms;
Chris PeBenito e9c6cd
')
Chris PeBenito e9c6cd
Chris PeBenito e9c6cd
########################################
Chris PeBenito e9c6cd
## <summary>
Chris PeBenito e9c6cd
##	Read sysadm temporary files.
Chris PeBenito e9c6cd
## </summary>
Chris PeBenito e9c6cd
## <param name="domain">
Chris PeBenito e9c6cd
##	<summary>
Chris PeBenito e9c6cd
##	Domain allowed access.
Chris PeBenito e9c6cd
##	</summary>
Chris PeBenito e9c6cd
## </param>
Chris PeBenito e9c6cd
#
Chris PeBenito e9c6cd
interface(`sysadm_read_tmp_files',`
Chris PeBenito e9c6cd
	gen_require(`
Chris PeBenito e9c6cd
		type sysadm_tmp_t;
Chris PeBenito e9c6cd
	')
Chris PeBenito e9c6cd
Chris PeBenito e9c6cd
	files_search_tmp($1)
Chris PeBenito e9c6cd
	allow $1 sysadm_tmp_t:dir list_dir_perms;
Chris PeBenito e9c6cd
	read_files_pattern($1, sysadm_tmp_t, sysadm_tmp_t)
Chris PeBenito e9c6cd
	read_lnk_files_pattern($1, sysadm_tmp_t, sysadm_tmp_t)
Chris PeBenito e9c6cd
')
Chris PeBenito e9c6cd