Chris PeBenito 17de1b
## <summary>Berkeley internet name domain DNS server.</summary>
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute ndc in the ndc domain.
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(`bind_domtrans_ndc',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type ndc_t, ndc_exec_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 0bfccd
	domtrans_pattern($1, ndc_exec_t, ndc_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Send generic signals to BIND.
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(`bind_signal',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type named_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	allow $1 named_t:process signal;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute ndc in the ndc domain, and
Chris PeBenito 17de1b
##	allow the specified role the ndc domain.
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
## <param name="role">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The role to be allowed the bind domain.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito bbcd3c
## <rolecap/>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`bind_run_ndc',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type ndc_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	bind_domtrans_ndc($1)
Chris PeBenito 17de1b
	role $2 types ndc_t;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute bind in the named domain.
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(`bind_domtrans',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type named_t, named_exec_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 0bfccd
	domtrans_pattern($1, named_exec_t, named_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Read DNSSEC keys.
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(`bind_read_dnssec_keys',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type named_conf_t, named_zone_t, dnssec_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 0bfccd
	read_files_pattern($1, { named_conf_t named_zone_t }, dnssec_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Read BIND named configuration files.
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(`bind_read_config',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type named_conf_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 0bfccd
	read_files_pattern($1, named_conf_t, named_conf_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Write BIND named configuration files.
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(`bind_write_config',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type named_conf_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 0bfccd
	write_files_pattern($1, named_conf_t, named_conf_t)
Chris PeBenito c0868a
	allow $1 named_conf_t:file setattr;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Create, read, write, and delete
Chris PeBenito 17de1b
##	BIND configuration directories.
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(`bind_manage_config_dirs',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type named_conf_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 0bfccd
	manage_dirs_pattern($1, named_conf_t, named_conf_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Search the BIND cache directory.
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(`bind_search_cache',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type named_conf_t, named_cache_t, named_zone_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_var($1)
Chris PeBenito 17de1b
	allow $1 named_conf_t:dir search_dir_perms;
Chris PeBenito 17de1b
	allow $1 named_zone_t:dir search_dir_perms;
Chris PeBenito 17de1b
	allow $1 named_cache_t:dir search_dir_perms;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Create, read, write, and delete
Chris PeBenito 17de1b
##	BIND cache files.
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(`bind_manage_cache',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type named_cache_t, named_zone_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_var($1)
Chris PeBenito 17de1b
	allow $1 named_zone_t:dir search_dir_perms;
Chris PeBenito 0bfccd
	manage_files_pattern($1, named_cache_t, named_cache_t)
Chris PeBenito 0bfccd
	manage_lnk_files_pattern($1, named_cache_t, named_cache_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Do not audit attempts to set the attributes
Chris PeBenito 17de1b
##	of the BIND pid directory.
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(`bind_setattr_pid_dirs',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type named_var_run_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	allow $1 named_var_run_t:dir setattr;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Read BIND zone files.
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(`bind_read_zone',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type named_zone_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_var($1)
Chris PeBenito 0bfccd
	read_files_pattern($1, named_zone_t, named_zone_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 33c7e6
##	Send and receive datagrams to and from named.  (Deprecated)
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(`bind_udp_chat_named',`
Chris PeBenito 33c7e6
	refpolicywarn(`$0($*) has been deprecated.')
Chris PeBenito 17de1b
')
Chris PeBenito f5394c
Chris PeBenito f5394c
########################################
Chris PeBenito f5394c
## <summary>
Chris PeBenito f5394c
##	All of the rules required to administrate 
Chris PeBenito f5394c
##	an bind environment
Chris PeBenito f5394c
## </summary>
Chris PeBenito f5394c
## <param name="domain">
Chris PeBenito f5394c
##	<summary>
Chris PeBenito f5394c
##	Domain allowed access.
Chris PeBenito f5394c
##	</summary>
Chris PeBenito f5394c
## </param>
Chris PeBenito aa7c46
## <param name="role">
Chris PeBenito aa7c46
##	<summary>
Chris PeBenito 5843d0
##	The role to be allowed to manage the bind domain.
Chris PeBenito aa7c46
##	</summary>
Chris PeBenito aa7c46
## </param>
Chris PeBenito f5394c
## <rolecap/>
Chris PeBenito f5394c
#
Chris PeBenito f5394c
interface(`bind_admin',`
Chris PeBenito f5394c
	gen_require(`
Chris PeBenito 5843d0
		type named_t, named_tmp_t, named_log_t;
Chris PeBenito 5843d0
		type named_conf_t, named_var_run_t;
Chris PeBenito 5843d0
		type named_cache_t, named_zone_t;
Chris PeBenito 5843d0
		type dnssec_t, ndc_t;
Chris PeBenito 5843d0
		type named_initrc_exec_t;
Chris PeBenito f5394c
	')
Chris PeBenito f5394c
Chris PeBenito f5394c
	allow $1 named_t:process { ptrace signal_perms };
Chris PeBenito f5394c
	ps_process_pattern($1, named_t)
Chris PeBenito 2a9837
Chris PeBenito f5394c
	allow $1 ndc_t:process { ptrace signal_perms };
Chris PeBenito f5394c
	ps_process_pattern($1, ndc_t)
Chris PeBenito 2a9837
Chris PeBenito 5843d0
	bind_run_ndc($1, $2)
Chris PeBenito 5843d0
Chris PeBenito 5843d0
	domain_system_change_exemption($1)
Chris PeBenito 5843d0
	role_transition $2 named_initrc_exec_t system_r;
Chris PeBenito 5843d0
	allow $2 system_r;
Chris PeBenito 5843d0
Chris PeBenito 5843d0
	files_list_tmp($1)
Chris PeBenito 5843d0
	admin_pattern($1, named_tmp_t)
Chris PeBenito 5843d0
Chris PeBenito 5843d0
	logging_list_logs($1)
Chris PeBenito 5843d0
	admin_pattern($1, named_log_t)
Chris PeBenito 5843d0
Chris PeBenito 5843d0
	files_list_etc($1)
Chris PeBenito 5843d0
	admin_pattern($1, named_conf_t)
Chris PeBenito 5843d0
Chris PeBenito 5843d0
	admin_pattern($1, named_cache_t)
Chris PeBenito 5843d0
	admin_pattern($1, named_zone_t)
Chris PeBenito 5843d0
	admin_pattern($1, dnssec_t)
Chris PeBenito 5843d0
Chris PeBenito 5843d0
	files_list_pids($1)
Chris PeBenito 5843d0
	admin_pattern($1, named_var_run_t)
Chris PeBenito f5394c
')