Chris PeBenito 9570b2
policy_module(ulogd, 1.1.0)
Chris PeBenito a5ef55
Chris PeBenito a5ef55
########################################
Chris PeBenito a5ef55
#
Chris PeBenito a5ef55
# Declarations
Chris PeBenito a5ef55
#
Chris PeBenito a5ef55
Chris PeBenito a5ef55
type ulogd_t;
Chris PeBenito a5ef55
type ulogd_exec_t;
Chris PeBenito a5ef55
init_daemon_domain(ulogd_t, ulogd_exec_t)
Chris PeBenito a5ef55
Chris PeBenito a5ef55
# config files
Chris PeBenito a5ef55
type ulogd_etc_t;
Chris PeBenito a5ef55
files_type(ulogd_etc_t)
Chris PeBenito a5ef55
Chris PeBenito a5ef55
type ulogd_initrc_exec_t;
Chris PeBenito a5ef55
init_script_file(ulogd_initrc_exec_t)
Chris PeBenito a5ef55
Chris PeBenito a5ef55
# /usr/lib files
Chris PeBenito a5ef55
type ulogd_modules_t;
Chris PeBenito a5ef55
files_type(ulogd_modules_t)
Chris PeBenito a5ef55
Chris PeBenito a5ef55
# log files
Chris PeBenito a5ef55
type ulogd_var_log_t;
Chris PeBenito a5ef55
logging_log_file(ulogd_var_log_t)
Chris PeBenito a5ef55
Chris PeBenito a5ef55
########################################
Chris PeBenito a5ef55
#
Chris PeBenito a5ef55
# ulogd local policy
Chris PeBenito a5ef55
#
Chris PeBenito a5ef55
Chris PeBenito a5ef55
allow ulogd_t self:capability net_admin;
Chris PeBenito a5ef55
allow ulogd_t self:netlink_nflog_socket create_socket_perms;
Dan Walsh 3eaa99
allow ulogd_t self:netlink_route_socket r_netlink_socket_perms;
Dan Walsh 3eaa99
allow ulogd_t self:tcp_socket { create_stream_socket_perms connect };
Dan Walsh 3eaa99
allow ulogd_t self:udp_socket create_socket_perms;
Chris PeBenito a5ef55
Chris PeBenito a5ef55
# config files
Chris PeBenito a5ef55
read_files_pattern(ulogd_t, ulogd_etc_t, ulogd_etc_t)
Chris PeBenito a5ef55
Chris PeBenito a5ef55
# modules for ulogd
Chris PeBenito a5ef55
list_dirs_pattern(ulogd_t, ulogd_modules_t, ulogd_modules_t)
Chris PeBenito a5ef55
mmap_files_pattern(ulogd_t, ulogd_modules_t, ulogd_modules_t)
Chris PeBenito a5ef55
Chris PeBenito a5ef55
# log files
Chris PeBenito a5ef55
manage_files_pattern(ulogd_t, ulogd_var_log_t, ulogd_var_log_t)
Chris PeBenito a5ef55
logging_log_filetrans(ulogd_t, ulogd_var_log_t, file)
Chris PeBenito a5ef55
Dan Walsh 3eaa99
files_read_etc_files(ulogd_t)
Dan Walsh 3eaa99
files_read_usr_files(ulogd_t)
Chris PeBenito a5ef55
Chris PeBenito a5ef55
miscfiles_read_localization(ulogd_t)
Dan Walsh 3eaa99
Dan Walsh 3eaa99
sysnet_dns_name_resolve(ulogd_t)
Dan Walsh 3eaa99
Dan Walsh 3eaa99
optional_policy(`
Dominick Grift 1e2abe
	mysql_stream_connect(ulogd_t)
Dominick Grift fae947
	mysql_tcp_connect(ulogd_t)
Dan Walsh 3eaa99
')
Dan Walsh 3eaa99
Dan Walsh 3eaa99
optional_policy(`
Dominick Grift 1e2abe
	postgresql_stream_connect(ulogd_t)
Dan Walsh 3eaa99
	postgresql_tcp_connect(ulogd_t)
Dan Walsh 3eaa99
')