]> code.ossystems Code Review - openembedded-core.git/commit
dbus_%.bbappend: stop using selinux_set_mapping
authorNisha Parrakat <nishaparrakat@gmail.com>
Fri, 13 Aug 2021 07:22:02 +0000 (07:22 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 13 Aug 2021 21:43:50 +0000 (22:43 +0100)
commit0441b53d55a919b5ac42e997f4092053b017b553
tree88f2e26ec3da319df8251298d16e8965f2c73051
parent8f96a2d13bbae8fb70ed7feafdcff26544e3710d
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

Signed-off-by: Nisha Parrakat <nishaparrakat@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/dbus/dbus.inc
meta/recipes-core/dbus/dbus/stop_using_selinux_set_mapping.patch [new file with mode: 0644]