1900668638
The latest revision of the labeled policy patches which enable both labeled and unlabeled policy support for NetLabel. This revision takes into account Chris' feedback from the first version and reduces the number of interface calls in each domain down to two at present: one for unlabeled access, one for NetLabel access. The older, transport layer specific interfaces, are still present for use by third-party modules but are not used in the default policy modules. trunk: Use netmsg initial SID for MLS-only Netlabel packets, from Paul Moore. This patch changes the policy to use the netmsg initial SID as the "base" SID/context for NetLabel packets which only have MLS security attributes. Currently we use the unlabeled initial SID which makes it very difficult to distinquish between actual unlabeled packets and those packets which have MLS security attributes.
102 lines
2.6 KiB
Plaintext
102 lines
2.6 KiB
Plaintext
|
|
policy_module(avahi,1.5.4)
|
|
|
|
########################################
|
|
#
|
|
# Declarations
|
|
#
|
|
|
|
type avahi_t;
|
|
type avahi_exec_t;
|
|
init_daemon_domain(avahi_t,avahi_exec_t)
|
|
|
|
type avahi_var_run_t;
|
|
files_pid_file(avahi_var_run_t)
|
|
|
|
########################################
|
|
#
|
|
# Local policy
|
|
#
|
|
|
|
allow avahi_t self:capability { dac_override setgid chown fowner kill setuid sys_chroot };
|
|
dontaudit avahi_t self:capability sys_tty_config;
|
|
allow avahi_t self:process { setrlimit signal_perms setcap };
|
|
allow avahi_t self:fifo_file { read write };
|
|
allow avahi_t self:unix_stream_socket { connectto create_stream_socket_perms };
|
|
allow avahi_t self:unix_dgram_socket create_socket_perms;
|
|
allow avahi_t self:tcp_socket create_stream_socket_perms;
|
|
allow avahi_t self:udp_socket create_socket_perms;
|
|
|
|
manage_files_pattern(avahi_t,avahi_var_run_t,avahi_var_run_t)
|
|
manage_sock_files_pattern(avahi_t,avahi_var_run_t,avahi_var_run_t)
|
|
allow avahi_t avahi_var_run_t:dir setattr;
|
|
files_pid_filetrans(avahi_t,avahi_var_run_t,file)
|
|
|
|
kernel_read_kernel_sysctls(avahi_t)
|
|
kernel_list_proc(avahi_t)
|
|
kernel_read_proc_symlinks(avahi_t)
|
|
kernel_read_network_state(avahi_t)
|
|
|
|
corenet_all_recvfrom_unlabeled(avahi_t)
|
|
corenet_all_recvfrom_netlabel(avahi_t)
|
|
corenet_tcp_sendrecv_all_if(avahi_t)
|
|
corenet_udp_sendrecv_all_if(avahi_t)
|
|
corenet_tcp_sendrecv_all_nodes(avahi_t)
|
|
corenet_udp_sendrecv_all_nodes(avahi_t)
|
|
corenet_tcp_sendrecv_all_ports(avahi_t)
|
|
corenet_udp_sendrecv_all_ports(avahi_t)
|
|
corenet_tcp_bind_all_nodes(avahi_t)
|
|
corenet_udp_bind_all_nodes(avahi_t)
|
|
corenet_tcp_bind_howl_port(avahi_t)
|
|
corenet_udp_bind_howl_port(avahi_t)
|
|
corenet_send_howl_client_packets(avahi_t)
|
|
corenet_receive_howl_server_packets(avahi_t)
|
|
|
|
dev_read_sysfs(avahi_t)
|
|
dev_read_urand(avahi_t)
|
|
|
|
fs_getattr_all_fs(avahi_t)
|
|
fs_search_auto_mountpoints(avahi_t)
|
|
|
|
domain_use_interactive_fds(avahi_t)
|
|
|
|
files_read_etc_files(avahi_t)
|
|
files_read_etc_runtime_files(avahi_t)
|
|
files_read_usr_files(avahi_t)
|
|
|
|
auth_use_nsswitch(avahi_t)
|
|
|
|
init_signal_script(avahi_t)
|
|
init_signull_script(avahi_t)
|
|
|
|
libs_use_ld_so(avahi_t)
|
|
libs_use_shared_libs(avahi_t)
|
|
|
|
logging_send_syslog_msg(avahi_t)
|
|
|
|
miscfiles_read_localization(avahi_t)
|
|
|
|
userdom_dontaudit_use_unpriv_user_fds(avahi_t)
|
|
userdom_dontaudit_search_sysadm_home_dirs(avahi_t)
|
|
|
|
ifdef(`targeted_policy',`
|
|
term_dontaudit_use_unallocated_ttys(avahi_t)
|
|
term_dontaudit_use_generic_ptys(avahi_t)
|
|
files_dontaudit_read_root_files(avahi_t)
|
|
')
|
|
|
|
optional_policy(`
|
|
dbus_system_bus_client_template(avahi,avahi_t)
|
|
dbus_connect_system_bus(avahi_t)
|
|
dbus_send_system_bus(avahi_t)
|
|
init_dbus_chat_script(avahi_t)
|
|
')
|
|
|
|
optional_policy(`
|
|
seutil_sigchld_newrole(avahi_t)
|
|
')
|
|
|
|
optional_policy(`
|
|
udev_read_db(avahi_t)
|
|
')
|