Chris PeBenito 17de1b
## <summary>Name service cache daemon</summary>
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Send generic signals to NSCD.
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(`nscd_signal',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type nscd_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	allow $1 nscd_t:process signal;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute NSCD in the nscd domain.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The type of the process performing this action.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`nscd_domtrans',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type nscd_t, nscd_exec_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 8021cb
	corecmd_search_bin($1)
Chris PeBenito c0868a
	domtrans_pattern($1,nscd_exec_t,nscd_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 465510
##	Allow the specified domain to execute nscd
Chris PeBenito 465510
##	in the caller domain.
Chris PeBenito 465510
## </summary>
Chris PeBenito 465510
## <param name="domain">
Chris PeBenito 465510
##	<summary>
Chris PeBenito 465510
##	Domain allowed access.
Chris PeBenito 465510
##	</summary>
Chris PeBenito 465510
## </param>
Chris PeBenito 465510
#
Chris PeBenito 465510
interface(`nscd_exec',`
Chris PeBenito 465510
	gen_require(`
Chris PeBenito 465510
		type nscd_exec_t;
Chris PeBenito 465510
	')
Chris PeBenito 465510
Chris PeBenito 465510
	can_exec($1,nscd_exec_t)
Chris PeBenito 465510
')
Chris PeBenito 465510
Chris PeBenito 465510
########################################
Chris PeBenito 465510
## <summary>
Chris PeBenito 17de1b
##	Use NSCD services by connecting using
Chris PeBenito 17de1b
##	a unix stream socket.
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(`nscd_socket_use',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type nscd_t, nscd_var_run_t;
Chris PeBenito 17de1b
		class nscd { getpwd getgrp gethost shmempwd shmemgrp shmemhost };
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	allow $1 self:unix_stream_socket create_socket_perms;
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	allow $1 nscd_t:nscd { getpwd getgrp gethost };
Chris PeBenito 17de1b
	dontaudit $1 nscd_t:fd use;
Chris PeBenito 17de1b
	dontaudit $1 nscd_t:nscd { shmempwd shmemgrp shmemhost };
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_pids($1)
Chris PeBenito c0868a
	stream_connect_pattern($1,nscd_var_run_t,nscd_var_run_t,nscd_t)
Chris PeBenito 17de1b
	dontaudit $1 nscd_var_run_t:file { getattr read };
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Use NSCD services by mapping the database from
Chris PeBenito 17de1b
##	an inherited NSCD file descriptor.
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(`nscd_shm_use',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type nscd_t, nscd_var_run_t;
Chris PeBenito 17de1b
		class nscd { getpwd getgrp gethost shmempwd shmemgrp shmemhost };
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito c0868a
	allow $1 nscd_var_run_t:dir list_dir_perms;
Chris PeBenito 17de1b
	allow $1 nscd_t:nscd { shmempwd shmemgrp shmemhost };
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	# Receive fd from nscd and map the backing file with read access.
Chris PeBenito 17de1b
	allow $1 nscd_t:fd use;
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	# cjp: these were originally inherited from the
Chris PeBenito 17de1b
	# nscd_socket_domain macro.  need to investigate
Chris PeBenito 17de1b
	# if they are all actually required
Chris PeBenito 17de1b
	allow $1 self:unix_stream_socket create_stream_socket_perms;
Chris PeBenito 17de1b
	allow $1 nscd_t:unix_stream_socket connectto;
Chris PeBenito 17de1b
	allow $1 nscd_var_run_t:sock_file rw_file_perms;
Chris PeBenito 17de1b
	files_search_pids($1)
Chris PeBenito 17de1b
	allow $1 nscd_t:nscd { getpwd getgrp gethost };
Chris PeBenito 17de1b
	dontaudit $1 nscd_var_run_t:file { getattr read };
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 4846dc
##	Do not audit attempts to search the NSCD pid directory.
Chris PeBenito 4846dc
## </summary>
Chris PeBenito 4846dc
## <param name="domain">
Chris PeBenito 4846dc
##	<summary>
Chris PeBenito 4846dc
##	Domain allowed access.
Chris PeBenito 4846dc
##	</summary>
Chris PeBenito 4846dc
## </param>
Chris PeBenito 4846dc
#
Chris PeBenito 4846dc
interface(`nscd_dontaudit_search_pid',`
Chris PeBenito 4846dc
	gen_require(`
Chris PeBenito 4846dc
		type nscd_var_run_t;
Chris PeBenito 4846dc
	')
Chris PeBenito 4846dc
Chris PeBenito 4846dc
	dontaudit $1 nscd_var_run_t:dir search;
Chris PeBenito 4846dc
')
Chris PeBenito 4846dc
Chris PeBenito 4846dc
########################################
Chris PeBenito 4846dc
## <summary>
Chris PeBenito 17de1b
##	Read NSCD pid file.
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(`nscd_read_pid',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type nscd_var_run_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_pids($1)
Chris PeBenito c0868a
	read_files_pattern($1,nscd_var_run_t,nscd_var_run_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Unconfined access to NSCD services.
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(`nscd_unconfined',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type nscd_t;
Chris PeBenito 17de1b
		class nscd all_nscd_perms;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	allow $1 nscd_t:nscd *;
Chris PeBenito 17de1b
')
Chris PeBenito cdc91b
Chris PeBenito cdc91b
########################################
Chris PeBenito cdc91b
## <summary>
Chris PeBenito cdc91b
##	Execute nscd in the nscd domain, and
Chris PeBenito cdc91b
##	allow the specified role the nscd domain.
Chris PeBenito cdc91b
## </summary>
Chris PeBenito cdc91b
## <param name="domain">
Chris PeBenito cdc91b
##	<summary>
Chris PeBenito cdc91b
##	Domain allowed access
Chris PeBenito cdc91b
##	</summary>
Chris PeBenito cdc91b
## </param>
Chris PeBenito cdc91b
## <param name="role">
Chris PeBenito cdc91b
##	<summary>
Chris PeBenito cdc91b
##	The role to be allowed the nscd domain.
Chris PeBenito cdc91b
##	</summary>
Chris PeBenito cdc91b
## </param>
Chris PeBenito cdc91b
## <param name="terminal">
Chris PeBenito cdc91b
##	<summary>
Chris PeBenito cdc91b
##	The type of the role's terminal.
Chris PeBenito cdc91b
##	</summary>
Chris PeBenito cdc91b
## </param>
Chris PeBenito cdc91b
#
Chris PeBenito cdc91b
interface(`nscd_run',`
Chris PeBenito cdc91b
	gen_require(`
Chris PeBenito cdc91b
		type nscd_t;
Chris PeBenito cdc91b
	')
Chris PeBenito cdc91b
Chris PeBenito cdc91b
	nscd_domtrans($1)
Chris PeBenito cdc91b
	role $2 types nscd_t;
Chris PeBenito cdc91b
	dontaudit nscd_t $3:chr_file rw_term_perms;
Chris PeBenito cdc91b
')