Skip to contentSkip to conversation

dbus_%.bbappend: stop using selinux_set_mapping

PATCH New Nisha Parrakat 1 participant 1 message Aug 13, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dbus_%.bbappend: stop using selinux_set_mapping

https://gitlab.freedesktop.org/dbus/dbus/-/issues/198
https://gitlab.freedesktop.org/dbus/dbus/-/commit/6072f8b24153d844a3033108a17bcd0c1a967816

Currently, if the "dbus" security class or the associated AV doesn't exist, dbus-daemon fails to initialize and exits immediately. Also the security classes or access vector cannot be reordered in the policy. This can be a problem for people developing their own policy or trying to access a machine where, for some reasons, there is not policy defined at all.

The code here copy the behaviour of the selinux_check_access() function. We cannot use this function here as it doesn't allow us to define the AVC entry reference.

See the discussion at https://marc.info/?l=selinux&m=152163374332372&w=2

---
 meta/recipes-core/dbus/dbus.inc               |   1 +
 .../dbus/stop_using_selinux_set_mapping.patch | 148 ++++++++++++++++++
 2 files changed, 149 insertions(+)
 create mode 100644 meta/recipes-core/dbus/dbus/stop_using_selinux_set_mapping.patch
meta/recipes-core/dbus/dbus.inc +1 -0
index b237476493..8c7daed5ef 100644
@@ -8,6 +8,7 @@ SRC_URI = "https://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
            file://tmpdir.patch \
            file://dbus-1.init \
            file://clear-guid_from_server-if-send_negotiate_unix_f.patch \
+           file://stop_using_selinux_set_mapping.patch \
 "
 
 SRC_URI[md5sum] = "dfe8a71f412e0b53be26ed4fbfdc91c4"
meta/recipes-core/dbus/dbus/stop_using_selinux_set_mapping.patch new file +148 -0

148 lines not on this page · raw message

Signature · 1 line
2.17.1