1
0
selinux-policy/fix_chronyd.patch
Johannes Segitz 9deff280f8 Accepting request 1042579 from home:jsegitz:branches:security:SELinux
- Updated fix_networkmanager.patch to fixe labeling of nm-dispatcher and
  nm-priv-helper until the packaging is adjusted (bsc#1206355)
- Update fix_chronyd.patch to allow  sendto towards
  NetworkManager_dispatcher_custom_t. Added new interface
  networkmanager_dispatcher_custom_dgram_send for this (bsc#1206357)
- Update fix_dbus.patch to allow dbus to watch lib directories (bsc#1205895)

- Updated fix_networkmanager.patch to allow NetworkManager to watch
  net_conf_t (bsc#1206109)

OBS-URL: https://build.opensuse.org/request/show/1042579
OBS-URL: https://build.opensuse.org/package/show/security:SELinux/selinux-policy?expand=0&rev=161
2022-12-13 09:20:16 +00:00

61 lines
2.2 KiB
Diff

Index: fedora-policy-20221019/policy/modules/contrib/chronyd.te
===================================================================
--- fedora-policy-20221019.orig/policy/modules/contrib/chronyd.te
+++ fedora-policy-20221019/policy/modules/contrib/chronyd.te
@@ -144,6 +144,15 @@ systemd_exec_systemctl(chronyd_t)
userdom_dgram_send(chronyd_t)
optional_policy(`
+ networkmanager_read_pid_files(chronyd_t)
+ networkmanager_dispatcher_custom_dgram_send(chronyd_t)
+')
+
+optional_policy(`
+ wicked_read_pid_files(chronyd_t)
+')
+
+optional_policy(`
cron_dgram_send(chronyd_t)
')
Index: fedora-policy-20221019/policy/modules/contrib/chronyd.fc
===================================================================
--- fedora-policy-20221019.orig/policy/modules/contrib/chronyd.fc
+++ fedora-policy-20221019/policy/modules/contrib/chronyd.fc
@@ -6,6 +6,8 @@
/usr/sbin/chronyd -- gen_context(system_u:object_r:chronyd_exec_t,s0)
/usr/libexec/chrony-helper -- gen_context(system_u:object_r:chronyd_exec_t,s0)
+/usr/lib/chrony/helper -- gen_context(system_u:object_r:chronyd_exec_t,s0)
+/usr/libexec/chrony/helper -- gen_context(system_u:object_r:chronyd_exec_t,s0)
/usr/bin/chronyc -- gen_context(system_u:object_r:chronyc_exec_t,s0)
Index: fedora-policy-20221019/policy/modules/contrib/networkmanager.if
===================================================================
--- fedora-policy-20221019.orig/policy/modules/contrib/networkmanager.if
+++ fedora-policy-20221019/policy/modules/contrib/networkmanager.if
@@ -684,3 +684,22 @@ template(`networkmanager_dispatcher_plug
domtrans_pattern(NetworkManager_dispatcher_t, NetworkManager_dispatcher_$1_script_t, NetworkManager_dispatcher_$1_t)
')
+
+########################################
+## <summary>
+## Send a message to NetworkManager_dispatcher_custom
+## over a unix domain datagram socket.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+#
+interface(`networkmanager_dispatcher_custom_dgram_send',`
+ gen_require(`
+ type NetworkManager_dispatcher_custom_t;
+ ')
+
+ allow $1 NetworkManager_dispatcher_custom_t:unix_dgram_socket sendto;
+')