Chris PeBenito 31b7c0
#DESC Snort - Network sniffer
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# Author: Shaun Savage <savages@pcez.com> 
Chris PeBenito 31b7c0
# Modified by Russell Coker <russell@coker.com.au>
Chris PeBenito 31b7c0
# X-Debian-Packages: snort-common
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
daemon_domain(snort)
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
logdir_domain(snort)
Chris PeBenito 31b7c0
allow snort_t snort_log_t:dir create;
Chris PeBenito 31b7c0
can_network_server(snort_t)
Chris PeBenito 31b7c0
type snort_etc_t, file_type, sysadmfile;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# Create temporary files.
Chris PeBenito 31b7c0
tmp_domain(snort)
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# use iptable netlink
Chris PeBenito 31b7c0
allow snort_t self:netlink_route_socket { bind create getattr nlmsg_read read write };
Chris PeBenito 31b7c0
allow snort_t self:packet_socket create_socket_perms;
Chris PeBenito 31b7c0
allow snort_t self:capability { setgid setuid net_admin net_raw dac_override };
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
r_dir_file(snort_t, snort_etc_t)
Chris PeBenito 31b7c0
allow snort_t etc_t:file { getattr read };
Chris PeBenito 31b7c0
allow snort_t etc_t:lnk_file read;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
allow snort_t self:unix_dgram_socket create_socket_perms;
Chris PeBenito 31b7c0
allow snort_t self:unix_stream_socket create_socket_perms;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# for start script
Chris PeBenito 31b7c0
allow initrc_t snort_etc_t:file { getattr read };
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
dontaudit snort_t { etc_runtime_t proc_t }:file { getattr read };