Chris PeBenito 4b9516
Chris PeBenito af2345
policy_module(avahi,1.0.1)
Chris PeBenito 4b9516
Chris PeBenito 4b9516
########################################
Chris PeBenito 4b9516
#
Chris PeBenito 4b9516
# Declarations
Chris PeBenito 4b9516
#
Chris PeBenito 4b9516
Chris PeBenito 4b9516
type avahi_t;
Chris PeBenito 4b9516
type avahi_exec_t;
Chris PeBenito 4b9516
init_daemon_domain(avahi_t,avahi_exec_t)
Chris PeBenito 4b9516
Chris PeBenito 4b9516
type avahi_var_run_t;
Chris PeBenito 4b9516
files_pid_file(avahi_var_run_t)
Chris PeBenito 4b9516
Chris PeBenito 4b9516
########################################
Chris PeBenito 4b9516
#
Chris PeBenito 4b9516
# Local policy
Chris PeBenito 4b9516
#
Chris PeBenito 4b9516
Chris PeBenito af2345
allow avahi_t self:capability { dac_override setgid chown kill setuid sys_chroot };
Chris PeBenito 4b9516
dontaudit avahi_t self:capability sys_tty_config;
Chris PeBenito af2345
allow avahi_t self:process { setrlimit signal_perms setcap };
Chris PeBenito 4b9516
allow avahi_t self:fifo_file { read write };
Chris PeBenito 4b9516
allow avahi_t self:unix_stream_socket { connectto create_stream_socket_perms };
Chris PeBenito 4b9516
allow avahi_t self:unix_dgram_socket create_socket_perms;
Chris PeBenito 4b9516
allow avahi_t self:netlink_route_socket r_netlink_socket_perms;
Chris PeBenito 4b9516
allow avahi_t self:tcp_socket create_stream_socket_perms;
Chris PeBenito 4b9516
allow avahi_t self:udp_socket create_socket_perms;
Chris PeBenito 4b9516
Chris PeBenito 4b9516
allow avahi_t avahi_var_run_t:sock_file create_file_perms;
Chris PeBenito 4b9516
allow avahi_t avahi_var_run_t:file create_file_perms;
Chris PeBenito 4b9516
allow avahi_t avahi_var_run_t:dir { rw_dir_perms setattr };
Chris PeBenito 4b9516
files_create_pid(avahi_t,avahi_var_run_t)
Chris PeBenito 4b9516
Chris PeBenito 4b9516
kernel_read_kernel_sysctl(avahi_t)
Chris PeBenito 4b9516
kernel_list_proc(avahi_t)
Chris PeBenito 4b9516
kernel_read_proc_symlinks(avahi_t)
Chris PeBenito 4b9516
kernel_read_network_state(avahi_t)
Chris PeBenito 4b9516
Chris PeBenito 4b9516
corenet_tcp_sendrecv_all_if(avahi_t)
Chris PeBenito 4b9516
corenet_raw_sendrecv_all_if(avahi_t)
Chris PeBenito 4b9516
corenet_udp_sendrecv_all_if(avahi_t)
Chris PeBenito 4b9516
corenet_tcp_sendrecv_all_nodes(avahi_t)
Chris PeBenito 4b9516
corenet_raw_sendrecv_all_nodes(avahi_t)
Chris PeBenito 4b9516
corenet_udp_sendrecv_all_nodes(avahi_t)
Chris PeBenito 4b9516
corenet_tcp_sendrecv_all_ports(avahi_t)
Chris PeBenito 4b9516
corenet_udp_sendrecv_all_ports(avahi_t)
Chris PeBenito 4b9516
corenet_tcp_bind_all_nodes(avahi_t)
Chris PeBenito 4b9516
corenet_udp_bind_all_nodes(avahi_t)
Chris PeBenito 4b9516
corenet_tcp_bind_howl_port(avahi_t)
Chris PeBenito 4b9516
corenet_udp_bind_howl_port(avahi_t)
Chris PeBenito 4b9516
Chris PeBenito 4b9516
dev_read_sysfs(avahi_t)
Chris PeBenito 4b9516
dev_read_urand(avahi_t)
Chris PeBenito 4b9516
Chris PeBenito 4b9516
fs_getattr_all_fs(avahi_t)
Chris PeBenito 4b9516
fs_search_auto_mountpoints(avahi_t)
Chris PeBenito 4b9516
Chris PeBenito 4b9516
term_dontaudit_use_console(avahi_t)
Chris PeBenito 4b9516
Chris PeBenito 4b9516
domain_use_wide_inherit_fd(avahi_t)
Chris PeBenito 4b9516
Chris PeBenito 4b9516
files_read_etc_files(avahi_t)
Chris PeBenito 4b9516
Chris PeBenito 4b9516
init_use_fd(avahi_t)
Chris PeBenito 4b9516
init_use_script_pty(avahi_t)
Chris PeBenito 4b9516
init_signal_script(avahi_t)
Chris PeBenito 4b9516
init_signull_script(avahi_t)
Chris PeBenito 4b9516
Chris PeBenito 4b9516
libs_use_ld_so(avahi_t)
Chris PeBenito 4b9516
libs_use_shared_libs(avahi_t)
Chris PeBenito 4b9516
Chris PeBenito 4b9516
logging_send_syslog_msg(avahi_t)
Chris PeBenito 4b9516
Chris PeBenito 4b9516
miscfiles_read_localization(avahi_t)
Chris PeBenito 4b9516
Chris PeBenito 4b9516
sysnet_read_config(avahi_t)
Chris PeBenito 4b9516
Chris PeBenito 4b9516
userdom_dontaudit_use_unpriv_user_fd(avahi_t)
Chris PeBenito 4b9516
userdom_dontaudit_search_sysadm_home_dir(avahi_t)
Chris PeBenito 4b9516
Chris PeBenito 4b9516
ifdef(`targeted_policy',`
Chris PeBenito 4b9516
	term_dontaudit_use_unallocated_tty(avahi_t)
Chris PeBenito 4b9516
	term_dontaudit_use_generic_pty(avahi_t)
Chris PeBenito 4b9516
	files_dontaudit_read_root_file(avahi_t)
Chris PeBenito 4b9516
')
Chris PeBenito 4b9516
Chris PeBenito 132880
optional_policy(`dbus',`
Chris PeBenito 4b9516
	dbus_system_bus_client_template(avahi,avahi_t)
Chris PeBenito 4b9516
	dbus_connect_system_bus(avahi_t)
Chris PeBenito 4b9516
	dbus_send_system_bus_msg(avahi_t)
Chris PeBenito 4b9516
Chris PeBenito 4b9516
	# FIXME:
Chris PeBenito 4b9516
	allow avahi_t unconfined_t:dbus send_msg;
Chris PeBenito 4b9516
	allow unconfined_t avahi_t:dbus send_msg;
Chris PeBenito 4b9516
')
Chris PeBenito 4b9516
Chris PeBenito 132880
optional_policy(`nis',`
Chris PeBenito 4b9516
	nis_use_ypbind(avahi_t)
Chris PeBenito 4b9516
')
Chris PeBenito 4b9516
Chris PeBenito 132880
optional_policy(`selinuxutil',`
Chris PeBenito 4b9516
	seutil_sigchld_newrole(avahi_t)
Chris PeBenito 4b9516
')
Chris PeBenito 4b9516
Chris PeBenito 132880
optional_policy(`udev',`
Chris PeBenito 4b9516
	udev_read_db(avahi_t)
Chris PeBenito 4b9516
')
Chris PeBenito 4b9516