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 17de1b
	corecmd_search_sbin($1)
Chris PeBenito 17de1b
	domain_auto_trans($1,nscd_exec_t,nscd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	allow $1 nscd_t:fd use;
Chris PeBenito 17de1b
	allow nscd_t $1:fd use;
Chris PeBenito 17de1b
	allow nscd_t $1:fifo_file rw_file_perms;
Chris PeBenito 17de1b
	allow nscd_t $1:process sigchld;
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:unix_stream_socket connectto;
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 17de1b
	allow $1 nscd_var_run_t:dir r_dir_perms;
Chris PeBenito 17de1b
	allow $1 nscd_var_run_t:sock_file rw_file_perms;
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 17de1b
	allow $1 nscd_var_run_t:dir r_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 17de1b
	allow $1 nscd_var_run_t:dir search;
Chris PeBenito 17de1b
	allow $1 nscd_var_run_t:file { getattr read };
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
')