+##
+## Determine whether squid can use the
+## pinger daemon (needs raw net access)
+##
+##
+gen_tunable(squid_use_pinger, true)
+
type squid_t;
type squid_exec_t;
init_daemon_domain(squid_t, squid_exec_t)
@@ -188,6 +196,11 @@ tunable_policy(`squid_connect_any',`
corenet_tcp_sendrecv_all_ports(squid_t)
')
+tunable_policy(`squid_use_pinger',`
+ allow squid_t self:rawip_socket connected_socket_perms;
+ allow squid_t self:capability net_raw;
+')
+
tunable_policy(`squid_use_tproxy',`
allow squid_t self:capability net_admin;
corenet_sendrecv_netport_server_packets(squid_t)
Index: refpolicy-2.20170224/policy/modules/kernel/corenetwork.te.in
===================================================================
--- refpolicy-2.20170224.orig/policy/modules/kernel/corenetwork.te.in
+++ refpolicy-2.20170224/policy/modules/kernel/corenetwork.te.in
@@ -213,7 +213,7 @@ network_port(pop, tcp,106,s0, tcp,109,s0
network_port(portmap, udp,111,s0, tcp,111,s0)
network_port(postfix_policyd, tcp,10031,s0)
network_port(postgresql, tcp,5432,s0)
-network_port(postgrey, tcp,60000,s0)
+network_port(postgrey, tcp,10023,s0, tcp,60000,s0)
network_port(pptp, tcp,1723,s0, udp,1723,s0)
network_port(prelude, tcp,4690,s0, udp,4690,s0)
network_port(presence, tcp,5298-5299,s0, udp,5298-5299,s0)
@@ -232,7 +232,7 @@ network_port(repository, tcp, 6363, s0)
network_port(ricci, tcp,11111,s0, udp,11111,s0)
network_port(ricci_modcluster, tcp,16851,s0, udp,16851,s0)
network_port(rlogind, tcp,513,s0)
-network_port(rndc, tcp,953,s0, udp,953,s0)
+network_port(rndc, tcp,953,s0, udp,953,s0, tcp,8953,s0, udp,8953,s0)
network_port(router, udp,520,s0, udp,521,s0, tcp,521,s0)
network_port(rsh, tcp,514,s0)
network_port(rsync, tcp,873,s0, udp,873,s0)
Index: refpolicy-2.20170224/policy/modules/services/ssh.te
===================================================================
--- refpolicy-2.20170224.orig/policy/modules/services/ssh.te
+++ refpolicy-2.20170224/policy/modules/services/ssh.te
@@ -250,6 +250,8 @@ optional_policy(`
allow sshd_t self:netlink_route_socket r_netlink_socket_perms;
allow sshd_t self:key { search link write };
+allow sshd_t self:capability net_admin;
+
allow sshd_t sshd_keytab_t:file read_file_perms;
manage_dirs_pattern(sshd_t, sshd_tmp_t, sshd_tmp_t)
Index: refpolicy-2.20170224/policy/modules/system/iptables.te
===================================================================
--- refpolicy-2.20170224.orig/policy/modules/system/iptables.te
+++ refpolicy-2.20170224/policy/modules/system/iptables.te
@@ -106,6 +106,10 @@ ifdef(`hide_broken_symptoms',`
')
optional_policy(`
+ permit_in_unconfined_r(iptables_t)
+')
+
+optional_policy(`
fail2ban_append_log(iptables_t)
')
@@ -153,4 +157,6 @@ optional_policy(`
optional_policy(`
udev_read_db(iptables_t)
+ # this is for iptables_t to inherit a file hande from xen vif-bridge
+ udev_manage_pid_files(iptables_t)
')
Index: refpolicy-2.20170224/policy/modules/system/sysnetwork.fc
===================================================================
--- refpolicy-2.20170224.orig/policy/modules/system/sysnetwork.fc
+++ refpolicy-2.20170224/policy/modules/system/sysnetwork.fc
@@ -58,6 +58,7 @@ ifdef(`distro_redhat',`
/var/lib/dhcp3? -d gen_context(system_u:object_r:dhcp_state_t,s0)
/var/lib/dhcp3?/dhclient.* gen_context(system_u:object_r:dhcpc_state_t,s0)
/var/lib/dhcpcd(/.*)? gen_context(system_u:object_r:dhcpc_state_t,s0)
+/var/lib/dhcpv6(/.*)? gen_context(system_u:object_r:dhcpc_state_t,s0)
/var/lib/dhclient(/.*)? gen_context(system_u:object_r:dhcpc_state_t,s0)
/var/lib/wifiroamd(/.*)? gen_context(system_u:object_r:dhcpc_state_t,s0)
@@ -70,5 +71,6 @@ ifdef(`distro_gentoo',`
ifdef(`distro_debian',`
/run/network(/.*)? gen_context(system_u:object_r:net_conf_t,s0)
+/var/run/resolvconf/.* -- gen_context(system_u:object_r:net_conf_t,s0)
')
Index: refpolicy-2.20170224/policy/modules/system/sysnetwork.if
===================================================================
--- refpolicy-2.20170224.orig/policy/modules/system/sysnetwork.if
+++ refpolicy-2.20170224/policy/modules/system/sysnetwork.if
@@ -442,6 +442,31 @@ interface(`sysnet_etc_filetrans_config',
#######################################
##