++##
++## Allow colord domain to connect to the network using TCP.
++##
++##
++gen_tunable(colord_can_network_connect, false)
++
+ type colord_t;
+ type colord_exec_t;
+ dbus_system_domain(colord_t, colord_exec_t)
+@@ -23,9 +30,11 @@ files_type(colord_var_lib_t)
# colord local policy
#
allow colord_t self:capability { dac_read_search dac_override };
@@ -31270,7 +31291,11 @@ index 74505cc..145a4eb 100644
allow colord_t self:process signal;
allow colord_t self:fifo_file rw_fifo_file_perms;
allow colord_t self:netlink_kobject_uevent_socket create_socket_perms;
-@@ -41,8 +42,13 @@ manage_dirs_pattern(colord_t, colord_var_lib_t, colord_var_lib_t)
++allow colord_t self:tcp_socket create_stream_socket_perms;
+ allow colord_t self:udp_socket create_socket_perms;
+ allow colord_t self:unix_dgram_socket create_socket_perms;
+
+@@ -41,8 +50,14 @@ manage_dirs_pattern(colord_t, colord_var_lib_t, colord_var_lib_t)
manage_files_pattern(colord_t, colord_var_lib_t, colord_var_lib_t)
files_var_lib_filetrans(colord_t, colord_var_lib_t, { file dir })
@@ -31282,10 +31307,11 @@ index 74505cc..145a4eb 100644
+
+# reads *.ini files
+corecmd_exec_bin(colord_t)
++corecmd_exec_shell(colord_t)
corenet_all_recvfrom_unlabeled(colord_t)
corenet_all_recvfrom_netlabel(colord_t)
-@@ -50,6 +56,8 @@ corenet_udp_bind_generic_node(colord_t)
+@@ -50,6 +65,8 @@ corenet_udp_bind_generic_node(colord_t)
corenet_udp_bind_ipp_port(colord_t)
corenet_tcp_connect_ipp_port(colord_t)
@@ -31294,7 +31320,7 @@ index 74505cc..145a4eb 100644
dev_read_video_dev(colord_t)
dev_write_video_dev(colord_t)
dev_rw_printer(colord_t)
-@@ -65,21 +73,24 @@ files_list_mnt(colord_t)
+@@ -65,19 +82,36 @@ files_list_mnt(colord_t)
files_read_etc_files(colord_t)
files_read_usr_files(colord_t)
@@ -31315,19 +31341,24 @@ index 74505cc..145a4eb 100644
-sysnet_dns_name_resolve(colord_t)
+fs_getattr_tmpfs(colord_t)
+userdom_rw_user_tmpfs_files(colord_t)
-
--tunable_policy(`use_nfs_home_dirs',`
-- fs_read_nfs_files(colord_t)
--')
--
--tunable_policy(`use_samba_home_dirs',`
-- fs_read_cifs_files(colord_t)
--')
++
+userdom_home_reader(colord_t)
++
++tunable_policy(`colord_can_network_connect',`
++ corenet_tcp_connect_all_ports(colord_t)
++')
- optional_policy(`
- cups_read_config(colord_t)
-@@ -89,6 +100,12 @@ optional_policy(`
+ tunable_policy(`use_nfs_home_dirs',`
++ fs_getattr_nfs(colord_t)
+ fs_read_nfs_files(colord_t)
+ ')
+
+ tunable_policy(`use_samba_home_dirs',`
++ fs_getattr_cifs(colord_t)
+ fs_read_cifs_files(colord_t)
+ ')
+
+@@ -89,6 +123,12 @@ optional_policy(`
')
optional_policy(`
@@ -31340,7 +31371,7 @@ index 74505cc..145a4eb 100644
policykit_dbus_chat(colord_t)
policykit_domtrans_auth(colord_t)
policykit_read_lib(colord_t)
-@@ -96,5 +113,16 @@ optional_policy(`
+@@ -96,5 +136,16 @@ optional_policy(`
')
optional_policy(`
@@ -33674,7 +33705,7 @@ index c43ff4c..5da88b5 100644
init_labeled_script_domtrans($1, cvs_initrc_exec_t)
domain_system_change_exemption($1)
diff --git a/policy/modules/services/cvs.te b/policy/modules/services/cvs.te
-index 88e7e97..e18dc0b 100644
+index 88e7e97..1546703 100644
--- a/policy/modules/services/cvs.te
+++ b/policy/modules/services/cvs.te
@@ -6,9 +6,9 @@ policy_module(cvs, 1.9.0)
@@ -33704,7 +33735,16 @@ index 88e7e97..e18dc0b 100644
manage_dirs_pattern(cvs_t, cvs_data_t, cvs_data_t)
manage_files_pattern(cvs_t, cvs_data_t, cvs_data_t)
-@@ -112,4 +112,5 @@ optional_policy(`
+@@ -81,6 +81,8 @@ files_read_etc_runtime_files(cvs_t)
+ # for identd; cjp: this should probably only be inetd_child rules?
+ files_search_home(cvs_t)
+
++init_dontaudit_read_utmp(cvs_t)
++
+ logging_send_syslog_msg(cvs_t)
+ logging_send_audit_msgs(cvs_t)
+
+@@ -112,4 +114,5 @@ optional_policy(`
read_files_pattern(httpd_cvs_script_t, cvs_data_t, cvs_data_t)
manage_dirs_pattern(httpd_cvs_script_t, cvs_tmp_t, cvs_tmp_t)
manage_files_pattern(httpd_cvs_script_t, cvs_tmp_t, cvs_tmp_t)
@@ -36415,7 +36455,7 @@ index 9bd812b..144cbb7 100644
+ dnsmasq_systemctl($1)
')
diff --git a/policy/modules/services/dnsmasq.te b/policy/modules/services/dnsmasq.te
-index fdaeeba..8542225 100644
+index fdaeeba..b1ea136 100644
--- a/policy/modules/services/dnsmasq.te
+++ b/policy/modules/services/dnsmasq.te
@@ -24,6 +24,9 @@ logging_log_file(dnsmasq_var_log_t)
@@ -36428,7 +36468,7 @@ index fdaeeba..8542225 100644
########################################
#
# Local policy
-@@ -48,11 +51,13 @@ files_var_lib_filetrans(dnsmasq_t, dnsmasq_lease_t, file)
+@@ -48,11 +51,14 @@ files_var_lib_filetrans(dnsmasq_t, dnsmasq_lease_t, file)
manage_files_pattern(dnsmasq_t, dnsmasq_var_log_t, dnsmasq_var_log_t)
logging_log_filetrans(dnsmasq_t, dnsmasq_var_log_t, file)
@@ -36439,11 +36479,12 @@ index fdaeeba..8542225 100644
kernel_read_kernel_sysctls(dnsmasq_t)
kernel_read_system_state(dnsmasq_t)
++kernel_read_network_state(dnsmasq_t)
+kernel_request_load_module(dnsmasq_t)
corenet_all_recvfrom_unlabeled(dnsmasq_t)
corenet_all_recvfrom_netlabel(dnsmasq_t)
-@@ -88,6 +93,8 @@ logging_send_syslog_msg(dnsmasq_t)
+@@ -88,6 +94,8 @@ logging_send_syslog_msg(dnsmasq_t)
miscfiles_read_localization(dnsmasq_t)
@@ -36452,7 +36493,7 @@ index fdaeeba..8542225 100644
userdom_dontaudit_use_unpriv_user_fds(dnsmasq_t)
userdom_dontaudit_search_user_home_dirs(dnsmasq_t)
-@@ -96,7 +103,20 @@ optional_policy(`
+@@ -96,7 +104,20 @@ optional_policy(`
')
optional_policy(`
@@ -36473,7 +36514,7 @@ index fdaeeba..8542225 100644
')
optional_policy(`
-@@ -114,4 +134,5 @@ optional_policy(`
+@@ -114,4 +135,5 @@ optional_policy(`
optional_policy(`
virt_manage_lib_files(dnsmasq_t)
virt_read_pid_files(dnsmasq_t)
@@ -43323,7 +43364,7 @@ index 67c7fdd..d7338be 100644
##