Chris PeBenito 17de1b
Chris PeBenito 2f84a7
policy_module(logging, 1.15.1)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Declarations
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito 17de1b
attribute logfile;
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type auditctl_t;
Chris PeBenito 17de1b
type auditctl_exec_t;
Chris PeBenito 3f67f7
init_system_domain(auditctl_t, auditctl_exec_t)
Chris PeBenito 17de1b
role system_r types auditctl_t;
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type auditd_etc_t;
Chris PeBenito 17de1b
files_security_file(auditd_etc_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type auditd_log_t;
Chris PeBenito 17de1b
files_security_file(auditd_log_t)
Chris PeBenito 3338f2
files_security_mountpoint(auditd_log_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type auditd_t;
Chris PeBenito e070dd
type auditd_exec_t;
Chris PeBenito 3f67f7
init_daemon_domain(auditd_t, auditd_exec_t)
Chris PeBenito 17de1b
Chris PeBenito cfafe4
type auditd_initrc_exec_t;
Chris PeBenito cfafe4
init_script_file(auditd_initrc_exec_t)
Chris PeBenito cfafe4
Chris PeBenito 17de1b
type auditd_var_run_t;
Chris PeBenito 17de1b
files_pid_file(auditd_var_run_t)
Chris PeBenito 17de1b
Chris PeBenito c11057
type audisp_t;
Chris PeBenito c11057
type audisp_exec_t;
Chris PeBenito c11057
init_system_domain(audisp_t, audisp_exec_t)
Chris PeBenito c11057
Chris PeBenito c11057
type audisp_var_run_t;
Chris PeBenito c11057
files_pid_file(audisp_var_run_t)
Chris PeBenito c11057
Chris PeBenito c11057
type audisp_remote_t;
Chris PeBenito c11057
type audisp_remote_exec_t;
Chris PeBenito c11057
logging_dispatcher_domain(audisp_remote_t, audisp_remote_exec_t)
Chris PeBenito c11057
Chris PeBenito 17de1b
type devlog_t;
Chris PeBenito 17de1b
files_type(devlog_t)
Chris PeBenito 17de1b
mls_trusted_object(devlog_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type klogd_t;
Chris PeBenito 17de1b
type klogd_exec_t;
Chris PeBenito 3f67f7
init_daemon_domain(klogd_t, klogd_exec_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type klogd_tmp_t;
Chris PeBenito 17de1b
files_tmp_file(klogd_tmp_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type klogd_var_run_t;
Chris PeBenito 17de1b
files_pid_file(klogd_var_run_t)
Chris PeBenito 17de1b
Chris PeBenito eaed90
type syslog_conf_t;
Chris PeBenito eaed90
files_type(syslog_conf_t)
Chris PeBenito eaed90
Chris PeBenito 17de1b
type syslogd_t;
Chris PeBenito 17de1b
type syslogd_exec_t;
Chris PeBenito 3f67f7
init_daemon_domain(syslogd_t, syslogd_exec_t)
Chris PeBenito 17de1b
Chris PeBenito cfafe4
type syslogd_initrc_exec_t;
Chris PeBenito cfafe4
init_script_file(syslogd_initrc_exec_t)
Chris PeBenito cfafe4
Chris PeBenito 17de1b
type syslogd_tmp_t;
Chris PeBenito 17de1b
files_tmp_file(syslogd_tmp_t)
Chris PeBenito 17de1b
Chris PeBenito eaed90
type syslogd_var_lib_t;
Chris PeBenito eaed90
files_type(syslogd_var_lib_t)
Chris PeBenito eaed90
Chris PeBenito 17de1b
type syslogd_var_run_t;
Chris PeBenito 17de1b
files_pid_file(syslogd_var_run_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type var_log_t;
Chris PeBenito 17de1b
logging_log_file(var_log_t)
Chris PeBenito d6d16b
files_mountpoint(var_log_t)
Chris PeBenito 17de1b
Chris PeBenito e070dd
ifdef(`enable_mls',`
Chris PeBenito c11057
	init_ranged_daemon_domain(auditd_t, auditd_exec_t, mls_systemhigh)
Chris PeBenito c11057
	init_ranged_daemon_domain(syslogd_t, syslogd_exec_t, mls_systemhigh)
Chris PeBenito e070dd
')
Chris PeBenito e070dd
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 14add3
# Auditctl local policy
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito eaed90
allow auditctl_t self:capability { fsetid dac_read_search dac_override };
Chris PeBenito eaed90
allow auditctl_t self:netlink_audit_socket nlmsg_readpriv;
Chris PeBenito 17de1b
Chris PeBenito 3f67f7
read_files_pattern(auditctl_t, auditd_etc_t, auditd_etc_t)
Chris PeBenito c0868a
allow auditctl_t auditd_etc_t:dir list_dir_perms;
Chris PeBenito 17de1b
Chris PeBenito 17de1b
# Needed for adding watches
Chris PeBenito 17de1b
files_getattr_all_dirs(auditctl_t)
Chris PeBenito 14add3
files_getattr_all_files(auditctl_t)
Chris PeBenito 17de1b
files_read_etc_files(auditctl_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
kernel_read_kernel_sysctls(auditctl_t)
Chris PeBenito 17de1b
kernel_read_proc_symlinks(auditctl_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
domain_read_all_domains_state(auditctl_t)
Chris PeBenito 17de1b
domain_use_interactive_fds(auditctl_t)
Chris PeBenito 17de1b
Chris PeBenito f8233a
mls_file_read_all_levels(auditctl_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
term_use_all_terms(auditctl_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
init_dontaudit_use_fds(auditctl_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
locallogin_dontaudit_use_fds(auditctl_t)
Chris PeBenito 17de1b
Chris PeBenito eaed90
logging_set_audit_parameters(auditctl_t)
Chris PeBenito 17de1b
logging_send_syslog_msg(auditctl_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Auditd local policy
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito eaed90
allow auditd_t self:capability { chown fsetid sys_nice sys_resource };
Chris PeBenito 17de1b
dontaudit auditd_t self:capability sys_tty_config;
Chris PeBenito 17de1b
allow auditd_t self:process { signal_perms setpgid setsched };
Chris PeBenito 0b36a2
allow auditd_t self:file rw_file_perms;
Chris PeBenito 17de1b
allow auditd_t self:unix_dgram_socket create_socket_perms;
Chris PeBenito eaed90
allow auditd_t self:fifo_file rw_file_perms;
Chris PeBenito 06099d
allow auditd_t self:tcp_socket create_stream_socket_perms;
Chris PeBenito 17de1b
Chris PeBenito c0868a
allow auditd_t auditd_etc_t:dir list_dir_perms;
Chris PeBenito ef659a
allow auditd_t auditd_etc_t:file read_file_perms;
Chris PeBenito 17de1b
Chris PeBenito 3f67f7
manage_files_pattern(auditd_t, auditd_log_t, auditd_log_t)
Chris PeBenito 3f67f7
manage_lnk_files_pattern(auditd_t, auditd_log_t, auditd_log_t)
Chris PeBenito c0868a
allow auditd_t var_log_t:dir search_dir_perms;
Chris PeBenito 17de1b
Chris PeBenito 3f67f7
manage_files_pattern(auditd_t, auditd_var_run_t, auditd_var_run_t)
Chris PeBenito 3f67f7
manage_sock_files_pattern(auditd_t, auditd_var_run_t, auditd_var_run_t)
Chris PeBenito 3f67f7
files_pid_filetrans(auditd_t, auditd_var_run_t, { file sock_file })
Chris PeBenito 17de1b
Chris PeBenito 17de1b
kernel_read_kernel_sysctls(auditd_t)
Chris PeBenito 17de1b
# Needs to be able to run dispatcher.  see /etc/audit/auditd.conf
Chris PeBenito 17de1b
# Probably want a transition, and a new auditd_helper app
Chris PeBenito 17de1b
kernel_read_system_state(auditd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
dev_read_sysfs(auditd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
fs_getattr_all_fs(auditd_t)
Chris PeBenito 17de1b
fs_search_auto_mountpoints(auditd_t)
Chris PeBenito 06099d
fs_rw_anon_inodefs_files(auditd_t)
Chris PeBenito 17de1b
Chris PeBenito d9845a
selinux_search_fs(auditctl_t)
Chris PeBenito d9845a
Chris PeBenito 06099d
corenet_all_recvfrom_unlabeled(auditd_t)
Chris PeBenito 06099d
corenet_all_recvfrom_netlabel(auditd_t)
Chris PeBenito 06099d
corenet_tcp_sendrecv_generic_if(auditd_t)
Chris PeBenito c12621
corenet_tcp_sendrecv_generic_node(auditd_t)
Chris PeBenito 06099d
corenet_tcp_sendrecv_all_ports(auditd_t)
Chris PeBenito c12621
corenet_tcp_bind_generic_node(auditd_t)
Chris PeBenito 06099d
corenet_tcp_bind_audit_port(auditd_t)
Chris PeBenito 06099d
corenet_sendrecv_audit_server_packets(auditd_t)
Chris PeBenito 06099d
Chris PeBenito 17de1b
# Needs to be able to run dispatcher.  see /etc/audit/auditd.conf
Chris PeBenito 17de1b
# Probably want a transition, and a new auditd_helper app
Chris PeBenito 17de1b
corecmd_exec_bin(auditd_t)
Chris PeBenito 465510
corecmd_exec_shell(auditd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
domain_use_interactive_fds(auditd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
files_read_etc_files(auditd_t)
Chris PeBenito 17de1b
files_list_usr(auditd_t)
Chris PeBenito 17de1b
Chris PeBenito a5f5eb
init_telinit(auditd_t)
Chris PeBenito 17de1b
Chris PeBenito eaed90
logging_set_audit_parameters(auditd_t)
Chris PeBenito 17de1b
logging_send_syslog_msg(auditd_t)
Chris PeBenito c11057
logging_domtrans_dispatcher(auditd_t)
Chris PeBenito c11057
logging_signal_dispatcher(auditd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
miscfiles_read_localization(auditd_t)
Chris PeBenito 17de1b
Chris PeBenito f8233a
mls_file_read_all_levels(auditd_t)
Chris PeBenito f8233a
mls_file_write_all_levels(auditd_t) # Need to be able to write to /var/run/ directory
Chris PeBenito 17de1b
Chris PeBenito 17de1b
seutil_dontaudit_read_config(auditd_t)
Chris PeBenito 17de1b
Chris PeBenito c11057
sysnet_dns_name_resolve(auditd_t)
Chris PeBenito c11057
Chris PeBenito 296273
userdom_use_user_terminals(auditd_t)
Chris PeBenito 17de1b
userdom_dontaudit_use_unpriv_user_fds(auditd_t)
Chris PeBenito 296273
userdom_dontaudit_search_user_home_dirs(auditd_t)
Chris PeBenito 17de1b
Chris PeBenito 12cf80
ifdef(`distro_ubuntu',`
Chris PeBenito 12cf80
	optional_policy(`
Chris PeBenito 12cf80
		unconfined_domain(auditd_t)
Chris PeBenito 12cf80
	')
Chris PeBenito 12cf80
')
Chris PeBenito 12cf80
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito c11057
	mta_send_mail(auditd_t)
Chris PeBenito c11057
')
Chris PeBenito c11057
Chris PeBenito c11057
optional_policy(`
Chris PeBenito 17de1b
	seutil_sigchld_newrole(auditd_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	udev_read_db(auditd_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito c11057
# audit dispatcher local policy
Chris PeBenito c11057
#
Chris PeBenito c11057
Chris PeBenito c11057
allow audisp_t self:capability sys_nice;
Chris PeBenito c11057
allow audisp_t self:process setsched;
Chris PeBenito c11057
allow audisp_t self:fifo_file rw_file_perms;
Chris PeBenito c11057
allow audisp_t self:unix_stream_socket create_stream_socket_perms;
Chris PeBenito c11057
allow audisp_t self:unix_dgram_socket create_socket_perms;
Chris PeBenito c11057
Chris PeBenito 0b36a2
allow audisp_t auditd_t:unix_stream_socket rw_socket_perms;
Chris PeBenito c11057
Chris PeBenito c11057
manage_sock_files_pattern(audisp_t, audisp_var_run_t, audisp_var_run_t)
Chris PeBenito c11057
files_pid_filetrans(audisp_t, audisp_var_run_t, sock_file)
Chris PeBenito c11057
Chris PeBenito c11057
corecmd_search_bin(audisp_t)
Chris PeBenito c11057
Chris PeBenito c11057
domain_use_interactive_fds(audisp_t)
Chris PeBenito c11057
Chris PeBenito c11057
files_read_etc_files(audisp_t)
Chris PeBenito c11057
Chris PeBenito c11057
mls_file_write_all_levels(audisp_t)
Chris PeBenito c11057
Chris PeBenito c11057
logging_send_syslog_msg(audisp_t)
Chris PeBenito c11057
Chris PeBenito c11057
miscfiles_read_localization(audisp_t)
Chris PeBenito c11057
Chris PeBenito 06099d
sysnet_dns_name_resolve(audisp_t)
Chris PeBenito 06099d
Chris PeBenito c11057
########################################
Chris PeBenito c11057
#
Chris PeBenito c11057
# Audit remote logger local policy
Chris PeBenito c11057
#
Chris PeBenito c11057
Chris PeBenito c11057
allow audisp_remote_t self:tcp_socket create_socket_perms;
Chris PeBenito c11057
Chris PeBenito c11057
corenet_all_recvfrom_unlabeled(audisp_remote_t)
Chris PeBenito c11057
corenet_all_recvfrom_netlabel(audisp_remote_t)
Chris PeBenito 668b30
corenet_tcp_sendrecv_generic_if(audisp_remote_t)
Chris PeBenito c12621
corenet_tcp_sendrecv_generic_node(audisp_remote_t)
Chris PeBenito 06099d
corenet_tcp_connect_audit_port(audisp_remote_t)
Chris PeBenito 06099d
corenet_sendrecv_audit_client_packets(audisp_remote_t)
Chris PeBenito c11057
Chris PeBenito c11057
files_read_etc_files(audisp_remote_t)
Chris PeBenito c11057
Chris PeBenito c11057
logging_send_syslog_msg(audisp_remote_t)
Chris PeBenito c11057
Chris PeBenito c11057
miscfiles_read_localization(audisp_remote_t)
Chris PeBenito c11057
Chris PeBenito c11057
sysnet_dns_name_resolve(audisp_remote_t)
Chris PeBenito c11057
Chris PeBenito c11057
########################################
Chris PeBenito c11057
#
Chris PeBenito 17de1b
# klogd local policy
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito 17de1b
allow klogd_t self:capability sys_admin;
Chris PeBenito 17de1b
dontaudit klogd_t self:capability { sys_resource sys_tty_config };
Chris PeBenito 17de1b
allow klogd_t self:process signal_perms;
Chris PeBenito 17de1b
Chris PeBenito 3f67f7
manage_dirs_pattern(klogd_t, klogd_tmp_t, klogd_tmp_t)
Chris PeBenito 3f67f7
manage_files_pattern(klogd_t, klogd_tmp_t, klogd_tmp_t)
Chris PeBenito 3f67f7
files_tmp_filetrans(klogd_t, klogd_tmp_t,{ file dir })
Chris PeBenito 17de1b
Chris PeBenito 3f67f7
manage_files_pattern(klogd_t, klogd_var_run_t, klogd_var_run_t)
Chris PeBenito 3f67f7
files_pid_filetrans(klogd_t, klogd_var_run_t, file)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
kernel_read_system_state(klogd_t)
Chris PeBenito 17de1b
kernel_read_messages(klogd_t)
Chris PeBenito 17de1b
kernel_read_kernel_sysctls(klogd_t)
Chris PeBenito 17de1b
# Control syslog and console logging
Chris PeBenito 17de1b
kernel_clear_ring_buffer(klogd_t)
Chris PeBenito 17de1b
kernel_change_ring_buffer_level(klogd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
files_read_kernel_symbol_table(klogd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
dev_read_raw_memory(klogd_t)
Chris PeBenito 17de1b
dev_read_sysfs(klogd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
fs_getattr_all_fs(klogd_t)
Chris PeBenito 17de1b
fs_search_auto_mountpoints(klogd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
domain_use_interactive_fds(klogd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
files_read_etc_runtime_files(klogd_t)
Chris PeBenito 17de1b
# read /etc/nsswitch.conf
Chris PeBenito 17de1b
files_read_etc_files(klogd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
logging_send_syslog_msg(klogd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
miscfiles_read_localization(klogd_t)
Chris PeBenito 17de1b
Chris PeBenito f8233a
mls_file_read_all_levels(klogd_t)
Chris PeBenito 17de1b
Chris PeBenito 296273
userdom_dontaudit_search_user_home_dirs(klogd_t)
Chris PeBenito 17de1b
Chris PeBenito 12cf80
ifdef(`distro_ubuntu',`
Chris PeBenito 12cf80
	optional_policy(`
Chris PeBenito 12cf80
		unconfined_domain(klogd_t)
Chris PeBenito 12cf80
	')
Chris PeBenito 12cf80
')
Chris PeBenito 12cf80
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	udev_read_db(klogd_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	seutil_sigchld_newrole(klogd_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# syslogd local policy
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito e9b9e4
# chown fsetid for syslog-ng
Chris PeBenito e9b9e4
# sys_admin for the integrated klog of syslog-ng and metalog
Chris PeBenito 17de1b
# cjp: why net_admin!
Chris PeBenito 17de1b
allow syslogd_t self:capability { dac_override sys_resource sys_tty_config net_admin sys_admin chown fsetid };
Chris PeBenito 17de1b
dontaudit syslogd_t self:capability sys_tty_config;
Chris PeBenito e9b9e4
# setpgid for metalog
Chris PeBenito 2f84a7
# setrlimit for syslog-ng
Chris PeBenito 2f84a7
allow syslogd_t self:process { signal_perms setpgid setrlimit };
Chris PeBenito 17de1b
# receive messages to be logged
Chris PeBenito 17de1b
allow syslogd_t self:unix_dgram_socket create_socket_perms;
Chris PeBenito 17de1b
allow syslogd_t self:unix_stream_socket create_stream_socket_perms;
Chris PeBenito 17de1b
allow syslogd_t self:unix_dgram_socket sendto;
Chris PeBenito 17de1b
allow syslogd_t self:fifo_file rw_file_perms;
Chris PeBenito 17de1b
allow syslogd_t self:udp_socket create_socket_perms;
Chris PeBenito 5c45ea
allow syslogd_t self:tcp_socket create_stream_socket_perms;
Chris PeBenito 17de1b
Chris PeBenito eaed90
allow syslogd_t syslog_conf_t:file read_file_perms;
Chris PeBenito eaed90
Chris PeBenito 17de1b
# Create and bind to /dev/log or /var/run/log.
Chris PeBenito c0868a
allow syslogd_t devlog_t:sock_file manage_sock_file_perms;
Chris PeBenito 3f67f7
files_pid_filetrans(syslogd_t, devlog_t, sock_file)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
# create/append log files.
Chris PeBenito 3f67f7
manage_files_pattern(syslogd_t, var_log_t, var_log_t)
Chris PeBenito 3f67f7
rw_fifo_files_pattern(syslogd_t, var_log_t, var_log_t)
Chris PeBenito 14add3
Chris PeBenito 17de1b
# Allow access for syslog-ng
Chris PeBenito 17de1b
allow syslogd_t var_log_t:dir { create setattr };
Chris PeBenito 17de1b
Chris PeBenito 17de1b
# manage temporary files
Chris PeBenito 3f67f7
manage_dirs_pattern(syslogd_t, syslogd_tmp_t, syslogd_tmp_t)
Chris PeBenito 3f67f7
manage_files_pattern(syslogd_t, syslogd_tmp_t, syslogd_tmp_t)
Chris PeBenito 3f67f7
files_tmp_filetrans(syslogd_t, syslogd_tmp_t, { dir file })
Chris PeBenito 17de1b
Chris PeBenito eaed90
manage_files_pattern(syslogd_t, syslogd_var_lib_t, syslogd_var_lib_t)
Chris PeBenito eaed90
files_search_var_lib(syslogd_t)
Chris PeBenito eaed90
Chris PeBenito c0868a
allow syslogd_t syslogd_var_run_t:file manage_file_perms;
Chris PeBenito 3f67f7
files_pid_filetrans(syslogd_t, syslogd_var_run_t, file)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
# manage pid file
Chris PeBenito 3f67f7
manage_files_pattern(syslogd_t, syslogd_var_run_t, syslogd_var_run_t)
Chris PeBenito 3f67f7
files_pid_filetrans(syslogd_t, syslogd_var_run_t, file)
Chris PeBenito 17de1b
Chris PeBenito c11057
kernel_read_system_state(syslogd_t)
Chris PeBenito 17de1b
kernel_read_kernel_sysctls(syslogd_t)
Chris PeBenito 17de1b
kernel_read_proc_symlinks(syslogd_t)
Chris PeBenito 17de1b
# Allow access to /proc/kmsg for syslog-ng
Chris PeBenito 17de1b
kernel_read_messages(syslogd_t)
Chris PeBenito 17de1b
kernel_clear_ring_buffer(syslogd_t)
Chris PeBenito 17de1b
kernel_change_ring_buffer_level(syslogd_t)
Chris PeBenito 17de1b
Chris PeBenito 190066
corenet_all_recvfrom_unlabeled(syslogd_t)
Chris PeBenito 190066
corenet_all_recvfrom_netlabel(syslogd_t)
Chris PeBenito 668b30
corenet_udp_sendrecv_generic_if(syslogd_t)
Chris PeBenito c12621
corenet_udp_sendrecv_generic_node(syslogd_t)
Chris PeBenito 17de1b
corenet_udp_sendrecv_all_ports(syslogd_t)
Chris PeBenito c12621
corenet_udp_bind_generic_node(syslogd_t)
Chris PeBenito 17de1b
corenet_udp_bind_syslogd_port(syslogd_t)
Chris PeBenito 6b19be
# syslog-ng can listen and connect on tcp port 514 (rsh)
Chris PeBenito 668b30
corenet_tcp_sendrecv_generic_if(syslogd_t)
Chris PeBenito c12621
corenet_tcp_sendrecv_generic_node(syslogd_t)
Chris PeBenito 6b19be
corenet_tcp_sendrecv_all_ports(syslogd_t)
Chris PeBenito c12621
corenet_tcp_bind_generic_node(syslogd_t)
Chris PeBenito 6b19be
corenet_tcp_bind_rsh_port(syslogd_t)
Chris PeBenito 6b19be
corenet_tcp_connect_rsh_port(syslogd_t)
Chris PeBenito 5f5b7a
# Allow users to define additional syslog ports to connect to
Chris PeBenito 5f5b7a
corenet_tcp_bind_syslogd_port(syslogd_t)
Chris PeBenito 5f5b7a
corenet_tcp_connect_syslogd_port(syslogd_t)
Chris PeBenito c11057
corenet_tcp_connect_postgresql_port(syslogd_t)
Chris PeBenito c11057
corenet_tcp_connect_mysqld_port(syslogd_t)
Chris PeBenito 6b19be
Chris PeBenito 17de1b
# syslog-ng can send or receive logs
Chris PeBenito 17de1b
corenet_sendrecv_syslogd_client_packets(syslogd_t)
Chris PeBenito 17de1b
corenet_sendrecv_syslogd_server_packets(syslogd_t)
Chris PeBenito c11057
corenet_sendrecv_postgresql_client_packets(syslogd_t)
Chris PeBenito c11057
corenet_sendrecv_mysqld_client_packets(syslogd_t)
Chris PeBenito 17de1b
Chris PeBenito 3f67f7
dev_filetrans(syslogd_t, devlog_t, sock_file)
Chris PeBenito c11057
dev_read_sysfs(syslogd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
domain_use_interactive_fds(syslogd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
files_read_etc_files(syslogd_t)
Chris PeBenito c11057
files_read_usr_files(syslogd_t)
Chris PeBenito 14add3
files_read_var_files(syslogd_t)
Chris PeBenito 17de1b
files_read_etc_runtime_files(syslogd_t)
Chris PeBenito 17de1b
# /initrd is not umounted before minilog starts
Chris PeBenito 17de1b
files_dontaudit_search_isid_type_dirs(syslogd_t)
Chris PeBenito c11057
files_read_kernel_symbol_table(syslogd_t)
Chris PeBenito c11057
Chris PeBenito c11057
fs_getattr_all_fs(syslogd_t)
Chris PeBenito c11057
fs_search_auto_mountpoints(syslogd_t)
Chris PeBenito c11057
Chris PeBenito c11057
mls_file_write_all_levels(syslogd_t) # Need to be able to write to /var/run/ and /var/log directories
Chris PeBenito c11057
Chris PeBenito c11057
term_write_console(syslogd_t)
Chris PeBenito c11057
# Allow syslog to a terminal
Chris PeBenito c11057
term_write_unallocated_ttys(syslogd_t)
Chris PeBenito c11057
Chris PeBenito c11057
# for sending messages to logged in users
Chris PeBenito c11057
init_read_utmp(syslogd_t)
Chris PeBenito c11057
init_dontaudit_write_utmp(syslogd_t)
Chris PeBenito c3c753
term_write_all_ttys(syslogd_t)
Chris PeBenito c11057
Chris PeBenito c11057
auth_use_nsswitch(syslogd_t)
Chris PeBenito c11057
Chris PeBenito c11057
init_use_fds(syslogd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
# cjp: this doesnt make sense
Chris PeBenito 17de1b
logging_send_syslog_msg(syslogd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
miscfiles_read_localization(syslogd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
userdom_dontaudit_use_unpriv_user_fds(syslogd_t)
Chris PeBenito 296273
userdom_dontaudit_search_user_home_dirs(syslogd_t)
Chris PeBenito 17de1b
Chris PeBenito ce6bf7
ifdef(`distro_gentoo',`
Chris PeBenito ce6bf7
	# default gentoo syslog-ng config appends kernel
Chris PeBenito ce6bf7
	# and high priority messages to /dev/tty12
Chris PeBenito ce6bf7
	term_append_unallocated_ttys(syslogd_t)
Chris PeBenito ce6bf7
	term_dontaudit_setattr_unallocated_ttys(syslogd_t)
Chris PeBenito ce6bf7
')
Chris PeBenito ce6bf7
Chris PeBenito 17de1b
ifdef(`distro_suse',`
Chris PeBenito 17de1b
	# suse creates a /dev/log under /var/lib/stunnel for chrooted stunnel
Chris PeBenito 3f67f7
	files_var_lib_filetrans(syslogd_t, devlog_t, sock_file)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 12cf80
ifdef(`distro_ubuntu',`
Chris PeBenito 12cf80
	optional_policy(`
Chris PeBenito 12cf80
		unconfined_domain(syslogd_t)
Chris PeBenito 12cf80
	')
Chris PeBenito 12cf80
')
Chris PeBenito 12cf80
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	inn_manage_log(syslogd_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito c11057
	postgresql_stream_connect(syslogd_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	seutil_sigchld_newrole(syslogd_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	udev_read_db(syslogd_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	# log to the xconsole
Chris PeBenito 17de1b
	xserver_rw_console(syslogd_t)
Chris PeBenito 17de1b
')