Chris PeBenito 17de1b
## <summary>Policy for the kernel message logger and system logging daemon.</summary>
Chris PeBenito 17de1b
Chris PeBenito 17de1b
#######################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Make the specified type a file
Chris PeBenito 17de1b
##	used for logs.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="file_type">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Type of the file to be used as a log.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`logging_log_file',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		attribute logfile;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_type($1)
Chris PeBenito 17de1b
	files_associate_tmp($1)
Chris PeBenito 17de1b
	fs_associate_tmpfs($1)
Chris PeBenito 17de1b
	typeattribute $1 logfile;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito d5b81a
#######################################
Chris PeBenito d5b81a
## <summary>
Chris PeBenito d5b81a
##	Send audit messages.
Chris PeBenito d5b81a
## </summary>
Chris PeBenito d5b81a
## <param name="domain">
Chris PeBenito d5b81a
##	<summary>
Chris PeBenito d5b81a
##	Domain allowed access.
Chris PeBenito d5b81a
##	</summary>
Chris PeBenito d5b81a
## </param>
Chris PeBenito d5b81a
#
Chris PeBenito d5b81a
interface(`logging_send_audit_msgs',`
Chris PeBenito d5b81a
	allow $1 self:capability audit_write;
Chris PeBenito d5b81a
	allow $1 self:netlink_audit_socket { create_netlink_socket_perms nlmsg_relay };
Chris PeBenito d5b81a
')
Chris PeBenito d5b81a
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Read the audit log.
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 bbcd3c
## <rolecap/>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`logging_read_audit_log',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type auditd_log_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_var($1)
Chris PeBenito c0868a
	read_files_pattern($1,auditd_log_t,auditd_log_t)
Chris PeBenito c0868a
	allow $1 auditd_log_t:dir list_dir_perms;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute auditctl in the auditctl 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(`logging_domtrans_auditctl',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type auditctl_t, auditctl_exec_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito c0868a
	domtrans_pattern($1,auditctl_exec_t,auditctl_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute auditctl in the auditctl domain, and
Chris PeBenito 17de1b
##	allow the specified role the auditctl 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 auditctl domain.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
## <param name="terminal">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The type of the terminal allow the auditctl domain to use.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito bbcd3c
## <rolecap/>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`logging_run_auditctl',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type auditctl_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	logging_domtrans_auditctl($1)
Chris PeBenito 17de1b
	role $2 types auditctl_t;
Chris PeBenito 17de1b
	allow auditctl_t $3:chr_file rw_term_perms;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute auditd in the auditd 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(`logging_domtrans_auditd',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type auditd_t, auditd_exec_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito c0868a
	domtrans_pattern($1,auditd_exec_t,auditd_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute auditd in the auditd domain, and
Chris PeBenito 17de1b
##	allow the specified role the auditd 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 auditd domain.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
## <param name="terminal">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The type of the terminal allow the auditd domain to use.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`logging_run_auditd',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type auditd_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	logging_domtrans_auditd($1)
Chris PeBenito 17de1b
	role $2 types auditd_t;
Chris PeBenito 17de1b
	allow auditd_t $3:chr_file rw_term_perms;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito a5e213
##	Connect to auditdstored over an unix stream socket.
Chris PeBenito a5e213
## </summary>
Chris PeBenito a5e213
## <param name="domain">
Chris PeBenito a5e213
##	<summary>
Chris PeBenito a5e213
##	Domain allowed access.
Chris PeBenito a5e213
##	</summary>
Chris PeBenito a5e213
## </param>
Chris PeBenito a5e213
#
Chris PeBenito a5e213
interface(`logging_stream_connect_auditd',`
Chris PeBenito a5e213
	gen_require(`
Chris PeBenito a5e213
		type auditd_t, auditd_var_run_t;
Chris PeBenito a5e213
	')
Chris PeBenito a5e213
Chris PeBenito a5e213
	files_search_pids($1)
Chris PeBenito c0868a
	stream_connect_pattern($1,auditd_var_run_t,auditd_var_run_t,auditd_t)
Chris PeBenito a5e213
')
Chris PeBenito a5e213
Chris PeBenito a5e213
########################################
Chris PeBenito a5e213
## <summary>
Chris PeBenito 17de1b
##	Manage the auditd 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 bbcd3c
## <rolecap/>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`logging_manage_audit_config',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type auditd_etc_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_etc($1)
Chris PeBenito c0868a
	manage_files_pattern($1,auditd_etc_t,auditd_etc_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Manage the audit log.
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 bbcd3c
## <rolecap/>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`logging_manage_audit_log',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type auditd_log_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_var($1)
Chris PeBenito c0868a
	manage_dirs_pattern($1,auditd_log_t,auditd_log_t)
Chris PeBenito c0868a
	manage_files_pattern($1,auditd_log_t,auditd_log_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute syslogd in the syslog 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(`logging_domtrans_syslog',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type syslogd_t, syslogd_exec_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 8021cb
	corecmd_search_bin($1)
Chris PeBenito c0868a
	domtrans_pattern($1,syslogd_exec_t,syslogd_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Create an object in the log directory, with a private
Chris PeBenito 17de1b
##	type using a type transition.
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="private type">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The type of the object to be created.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
## <param name="object">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The object class of the object being created.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`logging_log_filetrans',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type var_log_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_var($1)
Chris PeBenito c0868a
	filetrans_pattern($1,var_log_t,$2,$3)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Send system log messages.
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(`logging_send_syslog_msg',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type syslogd_t, devlog_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	allow $1 devlog_t:lnk_file read;
Chris PeBenito 17de1b
	allow $1 devlog_t:sock_file rw_file_perms;
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	# the type of socket depends on the syslog daemon
Chris PeBenito 17de1b
	allow $1 syslogd_t:unix_dgram_socket sendto;
Chris PeBenito 17de1b
	allow $1 syslogd_t:unix_stream_socket connectto;
Chris PeBenito 17de1b
	allow $1 self:unix_dgram_socket create_socket_perms;
Chris PeBenito 17de1b
	allow $1 self:unix_stream_socket create_socket_perms;
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	# cjp: this should most likely be removed:
Chris PeBenito 17de1b
	term_use_console($1)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Read the auditd 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 bbcd3c
## <rolecap/>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`logging_read_audit_config',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type auditd_etc_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_etc($1)
Chris PeBenito c0868a
	read_files_pattern($1,auditd_etc_t,auditd_etc_t)
Chris PeBenito c0868a
	allow $1 auditd_etc_t:dir list_dir_perms;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Allows the domain to open a file in the
Chris PeBenito 17de1b
##	log directory, but does not allow the listing
Chris PeBenito 17de1b
##	of the contents of the log 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(`logging_search_logs',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type var_log_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_var($1)
Chris PeBenito 465510
	allow $1 var_log_t:dir search_dir_perms;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
#######################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##      Do not audit attempts to search the var log directory.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##      <summary>
Chris PeBenito 17de1b
##      Domain not to audit.
Chris PeBenito 17de1b
##      </summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`logging_dontaudit_search_logs',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type var_log_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 465510
	dontaudit $1 var_log_t:dir search_dir_perms;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
#######################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	List the contents of the generic log directory (/var/log).
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(`logging_list_logs',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type var_log_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_var($1)
Chris PeBenito c0868a
	allow $1 var_log_t:dir list_dir_perms;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
#######################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Read and write the generic log directory (/var/log).
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(`logging_rw_generic_log_dirs',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type var_log_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_var($1)
Chris PeBenito 17de1b
	allow $1 var_log_t:dir rw_dir_perms;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Do not audit attempts to get the atttributes
Chris PeBenito 17de1b
##	of any log 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(`logging_dontaudit_getattr_all_logs',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		attribute logfile;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	dontaudit $1 logfile:file getattr;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Append to all log 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(`logging_append_all_logs',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		attribute logfile;
Chris PeBenito 17de1b
		type var_log_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_var($1)
Chris PeBenito c0868a
	allow $1 var_log_t:dir list_dir_perms;
Chris PeBenito 17de1b
	allow $1 logfile:file { getattr append };
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Read all log 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 bbcd3c
## <rolecap/>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`logging_read_all_logs',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		attribute logfile;
Chris PeBenito 17de1b
		type var_log_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_var($1)
Chris PeBenito c0868a
	allow $1 var_log_t:dir list_dir_perms;
Chris PeBenito c0868a
	read_files_pattern($1,var_log_t,logfile)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute all log files in the caller 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
# cjp: not sure why this is needed.  This was added
Chris PeBenito 17de1b
# because of logrotate.
Chris PeBenito 17de1b
interface(`logging_exec_all_logs',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		attribute logfile;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_var($1)
Chris PeBenito c0868a
	allow $1 logfile:dir list_dir_perms;
Chris PeBenito 17de1b
	can_exec($1,logfile)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Create, read, write, and delete all log 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 bbcd3c
## <rolecap/>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`logging_manage_all_logs',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		attribute logfile;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_var($1)
Chris PeBenito c0868a
	manage_files_pattern($1,logfile,logfile)
Chris PeBenito c0868a
	read_lnk_files_pattern($1,logfile,logfile)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Read generic log 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 bbcd3c
## <rolecap/>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`logging_read_generic_logs',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type var_log_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_var($1)
Chris PeBenito c0868a
	allow $1 var_log_t:dir list_dir_perms;
Chris PeBenito c0868a
	read_files_pattern($1,var_log_t,var_log_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Write generic log 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(`logging_write_generic_logs',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type var_log_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_var($1)
Chris PeBenito c0868a
	allow $1 var_log_t:dir list_dir_perms;
Chris PeBenito c0868a
	write_files_pattern($1,var_log_t,var_log_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Read and write generic log 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(`logging_rw_generic_logs',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type var_log_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_var($1)
Chris PeBenito c0868a
	allow $1 var_log_t:dir list_dir_perms;
Chris PeBenito c0868a
	rw_files_pattern($1,var_log_t,var_log_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Create, read, write, and delete
Chris PeBenito 17de1b
##	generic log 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 bbcd3c
## <rolecap/>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`logging_manage_generic_logs',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type var_log_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_var($1)
Chris PeBenito c0868a
	manage_files_pattern($1,var_log_t,var_log_t)
Chris PeBenito 17de1b
')