Chris PeBenito dbed95
## <summary>Tools for managing and hosting git repositories.</summary>
Chris PeBenito dbed95
Chris PeBenito dbed95
#######################################
Chris PeBenito dbed95
## <summary>
Chris PeBenito dbed95
##	Execute a domain transition to run gitosis.
Chris PeBenito dbed95
## </summary>
Chris PeBenito dbed95
## <param name="domain">
Chris PeBenito dbed95
## <summary>
Chris PeBenito dbed95
##	Domain allowed to transition.
Chris PeBenito dbed95
## </summary>
Chris PeBenito dbed95
## </param>
Chris PeBenito dbed95
#
Chris PeBenito dbed95
interface(`gitosis_domtrans',`
Chris PeBenito dbed95
	gen_require(`
Chris PeBenito dbed95
		type gitosis_t, gitosis_exec_t;
Chris PeBenito dbed95
	')
Chris PeBenito dbed95
Chris PeBenito dbed95
	domtrans_pattern($1, gitosis_exec_t, gitosis_t)
Chris PeBenito dbed95
')
Chris PeBenito dbed95
Chris PeBenito dbed95
#######################################
Chris PeBenito dbed95
## <summary>
Chris PeBenito dbed95
##	Execute gitosis-serve in the gitosis domain, and
Chris PeBenito dbed95
##	allow the specified role the gitosis domain.
Chris PeBenito dbed95
## </summary>
Chris PeBenito dbed95
## <param name="domain">
Chris PeBenito dbed95
##	<summary>
Chris PeBenito dbed95
##	Domain allowed access
Chris PeBenito dbed95
##	</summary>
Chris PeBenito dbed95
## </param>
Chris PeBenito dbed95
## <param name="role">
Chris PeBenito dbed95
##	<summary>
Chris PeBenito dbed95
##	Role allowed access.
Chris PeBenito dbed95
##	</summary>
Chris PeBenito dbed95
## </param>
Chris PeBenito dbed95
#
Chris PeBenito dbed95
interface(`gitosis_run',`
Chris PeBenito dbed95
	gen_require(`
Chris PeBenito dbed95
		type gitosis_t;
Chris PeBenito dbed95
	')
Chris PeBenito dbed95
Chris PeBenito dbed95
	gitosis_domtrans($1)
Chris PeBenito dbed95
	role $2 types gitosis_t;
Chris PeBenito dbed95
')
Chris PeBenito dbed95
Jeremy Solt 75c8a6
#######################################
Jeremy Solt 75c8a6
## <summary>
Jeremy Solt 75c8a6
##	Allow the specified domain to read
Jeremy Solt 75c8a6
##	gitosis lib files.
Jeremy Solt 75c8a6
## </summary>
Jeremy Solt 75c8a6
## <param name="domain">
Jeremy Solt 75c8a6
##	<summary>
Jeremy Solt 75c8a6
##	Domain allowed access.
Jeremy Solt 75c8a6
##	</summary>
Jeremy Solt 75c8a6
## </param>
Jeremy Solt 75c8a6
#
Jeremy Solt 75c8a6
interface(`gitosis_read_lib_files',`
Jeremy Solt 75c8a6
	gen_require(`
Jeremy Solt 75c8a6
		type gitosis_var_lib_t;
Jeremy Solt 75c8a6
	')
Jeremy Solt 75c8a6
Jeremy Solt 75c8a6
	files_search_var_lib($1)
Jeremy Solt 75c8a6
	read_files_pattern($1, gitosis_var_lib_t, gitosis_var_lib_t)
Jeremy Solt 75c8a6
	read_lnk_files_pattern($1, gitosis_var_lib_t, gitosis_var_lib_t)
Jeremy Solt 75c8a6
	list_dirs_pattern(%1, gitosis_var_lib_t, gitosis_var_lib_t)
Jeremy Solt 75c8a6
')
Jeremy Solt 75c8a6
Jeremy Solt 75c8a6
######################################
Jeremy Solt 75c8a6
## <summary>
Jeremy Solt 75c8a6
##	Allow the specified domain to manage
Jeremy Solt 75c8a6
##	gitosis lib files.
Jeremy Solt 75c8a6
## </summary>
Jeremy Solt 75c8a6
## <param name="domain">
Jeremy Solt 75c8a6
##	<summary>
Jeremy Solt 75c8a6
##	Domain allowed access.
Jeremy Solt 75c8a6
##	</summary>
Jeremy Solt 75c8a6
## </param>
Jeremy Solt 75c8a6
#
Jeremy Solt 75c8a6
interface(`gitosis_manage_lib_files',`
Jeremy Solt 75c8a6
	gen_require(`
Jeremy Solt 75c8a6
		type gitosis_var_lib_t;
Jeremy Solt 75c8a6
	')
Jeremy Solt 75c8a6
Jeremy Solt 75c8a6
	files_search_var_lib($1)
Jeremy Solt 75c8a6
	manage_files_pattern($1, gitosis_var_lib_t, gitosis_var_lib_t)
Jeremy Solt 75c8a6
')