Chris PeBenito 81bca1
## <summary>nslcd - local LDAP name service daemon.</summary>
Chris PeBenito 81bca1
Chris PeBenito 81bca1
########################################
Chris PeBenito 81bca1
## <summary>
Chris PeBenito 81bca1
##	Execute a domain transition to run nslcd.
Chris PeBenito 81bca1
## </summary>
Chris PeBenito 81bca1
## <param name="domain">
Chris PeBenito 81bca1
## <summary>
Chris PeBenito 81bca1
##	Domain allowed to transition.
Chris PeBenito 81bca1
## </summary>
Chris PeBenito 81bca1
## </param>
Chris PeBenito 81bca1
#
Chris PeBenito 81bca1
interface(`nslcd_domtrans',`
Chris PeBenito 81bca1
	gen_require(`
Chris PeBenito 81bca1
		type nslcd_t, nslcd_exec_t;
Chris PeBenito 81bca1
	')
Chris PeBenito 81bca1
Chris PeBenito 81bca1
	domtrans_pattern($1, nslcd_exec_t, nslcd_t)
Chris PeBenito 81bca1
')
Chris PeBenito 81bca1
Chris PeBenito 81bca1
########################################
Chris PeBenito 81bca1
## <summary>
Chris PeBenito 81bca1
##	Execute nslcd server in the nslcd domain.
Chris PeBenito 81bca1
## </summary>
Chris PeBenito 81bca1
## <param name="domain">
Chris PeBenito 81bca1
##	<summary>
Chris PeBenito 81bca1
##	The type of the process performing this action.
Chris PeBenito 81bca1
##	</summary>
Chris PeBenito 81bca1
## </param>
Chris PeBenito 81bca1
#
Chris PeBenito 81bca1
interface(`nslcd_initrc_domtrans',`
Chris PeBenito 81bca1
	gen_require(`
Chris PeBenito 81bca1
		type nslcd_initrc_exec_t;
Chris PeBenito 81bca1
	')
Chris PeBenito 81bca1
Chris PeBenito 81bca1
	init_labeled_script_domtrans($1, nslcd_initrc_exec_t)
Chris PeBenito 81bca1
')
Chris PeBenito 81bca1
Chris PeBenito 81bca1
########################################
Chris PeBenito 81bca1
## <summary>
Chris PeBenito 81bca1
##	Read nslcd PID files.
Chris PeBenito 81bca1
## </summary>
Chris PeBenito 81bca1
## <param name="domain">
Chris PeBenito 81bca1
##	<summary>
Chris PeBenito 81bca1
##	Domain allowed access.
Chris PeBenito 81bca1
##	</summary>
Chris PeBenito 81bca1
## </param>
Chris PeBenito 81bca1
#
Chris PeBenito 81bca1
interface(`nslcd_read_pid_files',`
Chris PeBenito 81bca1
	gen_require(`
Chris PeBenito 81bca1
		type nslcd_var_run_t;
Chris PeBenito 81bca1
	')
Chris PeBenito 81bca1
Chris PeBenito 81bca1
	files_search_pids($1)
Chris PeBenito 81bca1
	allow $1 nslcd_var_run_t:file read_file_perms;
Chris PeBenito 81bca1
')
Chris PeBenito 81bca1
Chris PeBenito 81bca1
########################################
Chris PeBenito 81bca1
## <summary>
Chris PeBenito 81bca1
##	Connect to nslcd over an unix stream socket.
Chris PeBenito 81bca1
## </summary>
Chris PeBenito 81bca1
## <param name="domain">
Chris PeBenito 81bca1
##	<summary>
Chris PeBenito 81bca1
##	Domain allowed to connect.
Chris PeBenito 81bca1
##	</summary>
Chris PeBenito 81bca1
## </param>
Chris PeBenito 81bca1
#
Chris PeBenito 81bca1
interface(`nslcd_stream_connect',`
Chris PeBenito 81bca1
	gen_require(`
Chris PeBenito 81bca1
		type nslcd_t, nslcd_var_run_t;
Chris PeBenito 81bca1
	')
Chris PeBenito 81bca1
Chris PeBenito 81bca1
	stream_connect_pattern($1, nslcd_var_run_t, nslcd_var_run_t, nslcd_t)
Chris PeBenito 81bca1
	files_search_pids($1)
Chris PeBenito 81bca1
')
Chris PeBenito 81bca1
Chris PeBenito 81bca1
########################################
Chris PeBenito 81bca1
## <summary>
Chris PeBenito 2d59a8
##	All of the rules required to administrate
Chris PeBenito 81bca1
##	an nslcd environment
Chris PeBenito 81bca1
## </summary>
Chris PeBenito 81bca1
## <param name="domain">
Chris PeBenito 81bca1
##	<summary>
Chris PeBenito 81bca1
##	Domain allowed access.
Chris PeBenito 81bca1
##	</summary>
Chris PeBenito 81bca1
## </param>
Chris PeBenito 81bca1
## <param name="role">
Chris PeBenito 81bca1
##	<summary>
Chris PeBenito 81bca1
##	Role allowed access.
Chris PeBenito 81bca1
##	</summary>
Chris PeBenito 81bca1
## </param>
Chris PeBenito 81bca1
## <rolecap/>
Chris PeBenito 81bca1
#
Chris PeBenito 81bca1
interface(`nslcd_admin',`
Chris PeBenito 81bca1
	gen_require(`
Chris PeBenito 81bca1
		type nslcd_t, nslcd_initrc_exec_t;
Chris PeBenito 2d59a8
		type nslcd_conf_t, nslcd_var_run_t;
Chris PeBenito 81bca1
	')
Chris PeBenito 81bca1
Chris PeBenito 81bca1
	ps_process_pattern($1, nslcd_t)
Chris PeBenito 81bca1
	allow $1 nslcd_t:process { ptrace signal_perms };
Chris PeBenito 81bca1
Chris PeBenito 81bca1
	# Allow nslcd_t to restart the apache service
Chris PeBenito 81bca1
	nslcd_initrc_domtrans($1)
Chris PeBenito 81bca1
	domain_system_change_exemption($1)
Chris PeBenito 81bca1
	role_transition $2 nslcd_initrc_exec_t system_r;
Chris PeBenito 81bca1
	allow $2 system_r;
Chris PeBenito 81bca1
Chris PeBenito 2d59a8
	manage_files_pattern($1, nslcd_conf_t, nslcd_conf_t)
Chris PeBenito 2d59a8
Chris PeBenito 2d59a8
	manage_dirs_pattern($1, nslcd_var_run_t, nslcd_var_run_t)
Chris PeBenito 2d59a8
	manage_files_pattern($1, nslcd_var_run_t, nslcd_var_run_t)
Chris PeBenito 2d59a8
	manage_lnk_files_pattern($1, nslcd_var_run_t, nslcd_var_run_t)
Chris PeBenito 81bca1
')