++##
++## Determine whether neutron can
++## connect to all TCP ports
++##
++##
++gen_tunable(neutron_can_network, false)
-type quantum_initrc_exec_t;
-init_script_file(quantum_initrc_exec_t)
-+type neutron_initrc_exec_t alias quantum_initrc_exec_t;
-+init_script_file(neutron_initrc_exec_t)
++type neutron_t alias quantum_t;
++type neutron_exec_t alias quantum_exec_t;
++init_daemon_domain(neutron_t, neutron_exec_t)
-type quantum_log_t;
-logging_log_file(quantum_log_t)
-+type neutron_log_t alias quantum_log_t;
-+logging_log_file(neutron_log_t)
++type neutron_initrc_exec_t alias quantum_initrc_exec_t;
++init_script_file(neutron_initrc_exec_t)
-type quantum_tmp_t;
-files_tmp_file(quantum_tmp_t)
-+type neutron_tmp_t alias quantum_tmp_t;
-+files_tmp_file(neutron_tmp_t)
++type neutron_log_t alias quantum_log_t;
++logging_log_file(neutron_log_t)
-type quantum_var_lib_t;
-files_type(quantum_var_lib_t)
++type neutron_tmp_t alias quantum_tmp_t;
++files_tmp_file(neutron_tmp_t)
++
+type neutron_var_lib_t alias quantum_var_lib_t;
+files_type(neutron_var_lib_t)
+
@@ -74041,6 +74380,41 @@ index 8644d8b..ddc4c31 100644
-allow quantum_t self:key manage_key_perms;
-allow quantum_t self:tcp_socket { accept listen };
-allow quantum_t self:unix_stream_socket { accept listen };
+-
+-manage_dirs_pattern(quantum_t, quantum_log_t, quantum_log_t)
+-append_files_pattern(quantum_t, quantum_log_t, quantum_log_t)
+-create_files_pattern(quantum_t, quantum_log_t, quantum_log_t)
+-setattr_files_pattern(quantum_t, quantum_log_t, quantum_log_t)
+-logging_log_filetrans(quantum_t, quantum_log_t, dir)
+-
+-manage_files_pattern(quantum_t, quantum_tmp_t, quantum_tmp_t)
+-files_tmp_filetrans(quantum_t, quantum_tmp_t, file)
+-
+-manage_dirs_pattern(quantum_t, quantum_var_lib_t, quantum_var_lib_t)
+-manage_files_pattern(quantum_t, quantum_var_lib_t, quantum_var_lib_t)
+-files_var_lib_filetrans(quantum_t, quantum_var_lib_t, dir)
+-
+-can_exec(quantum_t, quantum_tmp_t)
+-
+-kernel_read_kernel_sysctls(quantum_t)
+-kernel_read_system_state(quantum_t)
+-
+-corecmd_exec_shell(quantum_t)
+-corecmd_exec_bin(quantum_t)
+-
+-corenet_all_recvfrom_unlabeled(quantum_t)
+-corenet_all_recvfrom_netlabel(quantum_t)
+-corenet_tcp_sendrecv_generic_if(quantum_t)
+-corenet_tcp_sendrecv_generic_node(quantum_t)
+-corenet_tcp_sendrecv_all_ports(quantum_t)
+-corenet_tcp_bind_generic_node(quantum_t)
+-
+-dev_list_sysfs(quantum_t)
+-dev_read_urand(quantum_t)
+-
+-files_read_usr_files(quantum_t)
+-
+-auth_use_nsswitch(quantum_t)
+allow neutron_t self:capability { dac_override sys_ptrace kill setgid setuid sys_resource net_admin sys_admin net_raw net_bind_service};
+allow neutron_t self:capability2 block_suspend;
+allow neutron_t self:process { setsched setrlimit setcap signal_perms };
@@ -74058,141 +74432,127 @@ index 8644d8b..ddc4c31 100644
+create_files_pattern(neutron_t, neutron_log_t, neutron_log_t)
+setattr_files_pattern(neutron_t, neutron_log_t, neutron_log_t)
+logging_log_filetrans(neutron_t, neutron_log_t, dir)
-
--manage_dirs_pattern(quantum_t, quantum_log_t, quantum_log_t)
--append_files_pattern(quantum_t, quantum_log_t, quantum_log_t)
--create_files_pattern(quantum_t, quantum_log_t, quantum_log_t)
--setattr_files_pattern(quantum_t, quantum_log_t, quantum_log_t)
--logging_log_filetrans(quantum_t, quantum_log_t, dir)
++
+manage_files_pattern(neutron_t, neutron_tmp_t, neutron_tmp_t)
+manage_dirs_pattern(neutron_t, neutron_tmp_t, neutron_tmp_t)
+files_tmp_filetrans(neutron_t, neutron_tmp_t, { file dir })
-
--manage_files_pattern(quantum_t, quantum_tmp_t, quantum_tmp_t)
--files_tmp_filetrans(quantum_t, quantum_tmp_t, file)
++
+manage_dirs_pattern(neutron_t, neutron_var_lib_t, neutron_var_lib_t)
+manage_files_pattern(neutron_t, neutron_var_lib_t, neutron_var_lib_t)
+manage_sock_files_pattern(neutron_t, neutron_var_lib_t, neutron_var_lib_t)
+files_var_lib_filetrans(neutron_t, neutron_var_lib_t, dir)
-
--manage_dirs_pattern(quantum_t, quantum_var_lib_t, quantum_var_lib_t)
--manage_files_pattern(quantum_t, quantum_var_lib_t, quantum_var_lib_t)
--files_var_lib_filetrans(quantum_t, quantum_var_lib_t, dir)
++
+can_exec(neutron_t, neutron_tmp_t)
-
--can_exec(quantum_t, quantum_tmp_t)
++
+kernel_rw_kernel_sysctl(neutron_t)
+kernel_rw_net_sysctls(neutron_t)
+kernel_read_system_state(neutron_t)
+kernel_read_network_state(neutron_t)
+kernel_request_load_module(neutron_t)
-
--kernel_read_kernel_sysctls(quantum_t)
--kernel_read_system_state(quantum_t)
++
+corecmd_exec_shell(neutron_t)
+corecmd_exec_bin(neutron_t)
-
--corecmd_exec_shell(quantum_t)
--corecmd_exec_bin(quantum_t)
++
+corenet_all_recvfrom_unlabeled(neutron_t)
+corenet_all_recvfrom_netlabel(neutron_t)
+corenet_tcp_sendrecv_generic_if(neutron_t)
+corenet_tcp_sendrecv_generic_node(neutron_t)
+corenet_tcp_sendrecv_all_ports(neutron_t)
+corenet_tcp_bind_generic_node(neutron_t)
-
--corenet_all_recvfrom_unlabeled(quantum_t)
--corenet_all_recvfrom_netlabel(quantum_t)
--corenet_tcp_sendrecv_generic_if(quantum_t)
--corenet_tcp_sendrecv_generic_node(quantum_t)
--corenet_tcp_sendrecv_all_ports(quantum_t)
--corenet_tcp_bind_generic_node(quantum_t)
++
+corenet_tcp_bind_neutron_port(neutron_t)
++corenet_tcp_connect_neutron_port(neutron_t)
+corenet_tcp_connect_keystone_port(neutron_t)
+corenet_tcp_connect_amqp_port(neutron_t)
+corenet_tcp_connect_mysqld_port(neutron_t)
+corenet_tcp_connect_osapi_compute_port(neutron_t)
-
--dev_list_sysfs(quantum_t)
--dev_read_urand(quantum_t)
++
+domain_read_all_domains_state(neutron_t)
+domain_named_filetrans(neutron_t)
-
--files_read_usr_files(quantum_t)
++
+dev_read_sysfs(neutron_t)
+dev_read_urand(neutron_t)
+dev_mounton_sysfs(neutron_t)
+dev_mount_sysfs_fs(neutron_t)
+dev_unmount_sysfs_fs(neutron_t)
-
--auth_use_nsswitch(quantum_t)
++
+files_mounton_non_security(neutron_t)
-
--libs_exec_ldconfig(quantum_t)
++
+auth_use_nsswitch(neutron_t)
-
--logging_send_audit_msgs(quantum_t)
--logging_send_syslog_msg(quantum_t)
++
+libs_exec_ldconfig(neutron_t)
-
--miscfiles_read_localization(quantum_t)
++
+logging_send_audit_msgs(neutron_t)
+logging_send_syslog_msg(neutron_t)
-
--sysnet_domtrans_ifconfig(quantum_t)
++
+netutils_exec(neutron_t)
+
+# need to stay in neutron
+sysnet_exec_ifconfig(neutron_t)
+sysnet_manage_ifconfig_run(neutron_t)
+sysnet_filetrans_named_content_ifconfig(neutron_t)
++
++tunable_policy(`neutron_can_network',`
++ corenet_sendrecv_all_client_packets(neutron_t)
++ corenet_tcp_connect_all_ports(neutron_t)
++ corenet_tcp_sendrecv_all_ports(neutron_t)
++')
- optional_policy(`
-- brctl_domtrans(quantum_t)
+-libs_exec_ldconfig(quantum_t)
++optional_policy(`
+ brctl_domtrans(neutron_t)
- ')
++')
- optional_policy(`
-- mysql_stream_connect(quantum_t)
-- mysql_read_config(quantum_t)
+-logging_send_audit_msgs(quantum_t)
+-logging_send_syslog_msg(quantum_t)
++optional_policy(`
+ dnsmasq_domtrans(neutron_t)
+ dnsmasq_signal(neutron_t)
+ dnsmasq_read_state(neutron_t)
+')
-- mysql_tcp_connect(quantum_t)
+-miscfiles_read_localization(quantum_t)
++optional_policy(`
++ rhcs_domtrans_haproxy(neutron_t)
++')
+
+-sysnet_domtrans_ifconfig(quantum_t)
+optional_policy(`
+ iptables_domtrans(neutron_t)
- ')
++')
optional_policy(`
-- postgresql_stream_connect(quantum_t)
-- postgresql_unpriv_client(quantum_t)
+- brctl_domtrans(quantum_t)
+ modutils_domtrans_insmod(neutron_t)
-+')
+ ')
-- postgresql_tcp_connect(quantum_t)
-+optional_policy(`
+ optional_policy(`
+- mysql_stream_connect(quantum_t)
+- mysql_read_config(quantum_t)
+ mysql_stream_connect(neutron_t)
+ mysql_read_db_lnk_files(neutron_t)
+ mysql_read_config(neutron_t)
+ mysql_tcp_connect(neutron_t)
- ')
-+
++')
+
+- mysql_tcp_connect(quantum_t)
+optional_policy(`
+ postgresql_stream_connect(neutron_t)
+ postgresql_unpriv_client(neutron_t)
+ postgresql_tcp_connect(neutron_t)
-+')
-+
-+optional_policy(`
+ ')
+
+ optional_policy(`
+- postgresql_stream_connect(quantum_t)
+- postgresql_unpriv_client(quantum_t)
+ openvswitch_domtrans(neutron_t)
+ openvswitch_stream_connect(neutron_t)
+')
-+
+
+- postgresql_tcp_connect(quantum_t)
+optional_policy(`
+ sudo_exec(neutron_t)
-+')
+ ')
+
+optional_policy(`
+ udev_domtrans(neutron_t)
@@ -74789,18 +75149,20 @@ index dc3b0ed..20f9ced 100644
-miscfiles_read_localization(rabbitmq_epmd_t)
diff --git a/radius.fc b/radius.fc
-index d447e85..008ee02 100644
+index d447e85..76ed794 100644
--- a/radius.fc
+++ b/radius.fc
-@@ -9,6 +9,8 @@
+@@ -9,7 +9,9 @@
/usr/sbin/radiusd -- gen_context(system_u:object_r:radiusd_exec_t,s0)
/usr/sbin/freeradius -- gen_context(system_u:object_r:radiusd_exec_t,s0)
+-/var/lib/radiousd(/.*)? gen_context(system_u:object_r:radiusd_var_lib_t,s0)
+/usr/lib/systemd/system/radiusd.* -- gen_context(system_u:object_r:radiusd_unit_file_t,s0)
+
- /var/lib/radiousd(/.*)? gen_context(system_u:object_r:radiusd_var_lib_t,s0)
++/var/lib/radiusd(/.*)? gen_context(system_u:object_r:radiusd_var_lib_t,s0)
/var/log/freeradius(/.*)? gen_context(system_u:object_r:radiusd_log_t,s0)
+ /var/log/radacct(/.*)? gen_context(system_u:object_r:radiusd_log_t,s0)
diff --git a/radius.if b/radius.if
index 4460582..60cf556 100644
--- a/radius.if
@@ -77737,7 +78099,7 @@ index 47de2d6..5ad36aa 100644
+/var/log/cluster/rgmanager\.log.* -- gen_context(system_u:object_r:cluster_var_log_t,s0)
+/var/log/pcsd(/.*)? gen_context(system_u:object_r:cluster_var_log_t,s0)
diff --git a/rhcs.if b/rhcs.if
-index c8bdea2..1337d42 100644
+index c8bdea2..abc53b9 100644
--- a/rhcs.if
+++ b/rhcs.if
@@ -1,19 +1,19 @@
@@ -77912,8 +78274,29 @@ index c8bdea2..1337d42 100644
##