Chris PeBenito 9401ae1
## <summary>Who is logged in on other machines?</summary>
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Execute a domain transition to run rwho.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Domain allowed to transition.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`rwho_domtrans',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type rwho_t, rwho_exec_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	domtrans_pattern($1, rwho_exec_t, rwho_t)
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Search rwho log directories.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain allowed access.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`rwho_search_log',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type rwho_log_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	allow $1 rwho_log_t:dir search_dir_perms;
Chris PeBenito 9401ae1
	logging_search_logs($1)
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Read rwho log files.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain allowed access.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`rwho_read_log_files',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type rwho_log_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	allow $1 rwho_log_t:file read_file_perms;
Chris PeBenito 9401ae1
	allow $1 rwho_log_t:dir list_dir_perms;
Chris PeBenito 9401ae1
	logging_search_logs($1)
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Search rwho spool directories.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain allowed access.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`rwho_search_spool',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type rwho_spool_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	allow $1 rwho_spool_t:dir search_dir_perms;
Chris PeBenito 9401ae1
	files_search_spool($1)
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Read rwho spool files.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain allowed access.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`rwho_read_spool_files',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type rwho_spool_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	read_files_pattern($1, rwho_spool_t, rwho_spool_t)
Chris PeBenito 9401ae1
	files_search_spool($1)
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Create, read, write, and delete
Chris PeBenito 9401ae1
##	rwho spool files.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain allowed access.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`rwho_manage_spool_files',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type rwho_spool_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	manage_files_pattern($1, rwho_spool_t, rwho_spool_t)
Chris PeBenito 9401ae1
	files_search_spool($1)
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	All of the rules required to administrate 
Chris PeBenito 9401ae1
##	an rwho environment
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain allowed access.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
## <param name="role">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	The role allowed access.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
## <rolecap/>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`rwho_admin',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type rwho_t, rwho_log_t, rwho_spool_t;
Chris PeBenito 9401ae1
		type rwho_initrc_exec_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	allow $1 rwho_t:process { ptrace signal_perms };
Chris PeBenito 9401ae1
	ps_process_pattern($1, rwho_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	init_labeled_script_domtrans($1, rwho_initrc_exec_t)
Chris PeBenito 9401ae1
	domain_system_change_exemption($1)
Chris PeBenito 9401ae1
	role_transition $2 rwho_initrc_exec_t system_r;
Chris PeBenito 9401ae1
	allow $2 system_r;
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	logging_list_logs($1)
Chris PeBenito 9401ae1
	admin_pattern($1, rwho_log_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	files_list_spool($1)
Chris PeBenito 9401ae1
	admin_pattern($1, rwho_spool_t)
Chris PeBenito 9401ae1
')