selinux-refpolicy/policy/modules/kernel
Krzysztof Nowicki 364621e6ec Allow use of systemd UNIX sockets created at initrd execution
Systemd uses a number of UNIX sockets for communication (notify
socket [1], journald socket). These sockets are normally created at
start-up after the SELinux policy is loaded, which means that the
kernel socket objects have proper security contexts of the creating
processes.

Unfortunately things look different when the system is started with an
initrd that is also running systemd (e.g. dracut). In such case the
sockets are created in the initrd systemd environment before the
SELinux policy is loaded and therefore the socket object is assigned
the default kernel context (system_u:system_r:kernel_t). When the
initrd systemd transfers control to the main systemd the notify socket
descriptors are passed to the main systemd process [2]. This means
that when the main system is running the sockets will use the default
kernel securint context until they are recreated, which for some
sockets (notify socket) never happens.

Until there is a way to change the context of an already open socket
object all processes, that wish to use systemd sockets need to be
able to send datagrams to system_u:system_r:kernel_t sockets.

Parts of this workaround were earlier hidden behind RedHat-specific
rules, since this distribution is the prime user of systemd+dracut
combo. Since other distros may want to use similar configuration it
makes sense to enable this globally.

[1] sd_notify(3)
[2] https://github.com/systemd/systemd/issues/16714

Signed-off-by: Krzysztof Nowicki <krissn@op.pl>

tmp
2021-02-09 13:24:51 +01:00
..
corecommands.fc corecommands: add entry for Busybox shell 2020-09-21 16:25:09 +02:00
corecommands.if remove deprecated from 20190201 2021-01-25 08:59:34 -05:00
corecommands.te Bump module versions for release. 2021-02-03 08:38:26 -05:00
corenetwork.fc
corenetwork.if.in Fix several misspellings 2020-08-13 14:08:58 +02:00
corenetwork.if.m4 Allow systemd-networkd to handle ICMP and DHCP packets 2020-04-22 15:46:56 +03:00
corenetwork.te.in Bump module versions for release. 2021-02-03 08:38:26 -05:00
corenetwork.te.m4 work on SELint issues 2020-08-13 21:23:43 +02:00
devices.fc Fix several misspellings 2020-08-13 14:08:58 +02:00
devices.if remove deprecated from 20190201 2021-01-25 08:59:34 -05:00
devices.te Bump module versions for release. 2021-02-03 08:38:26 -05:00
domain.fc
domain.if Merge pull request #296 from cgzones/diff-check 2020-08-13 09:19:48 -04:00
domain.te Bump module versions for release. 2020-08-18 09:09:10 -04:00
files.fc Remove modules for programs that are deprecated or no longer supported. 2021-01-14 17:14:30 -05:00
files.if selint: fix S-010 2020-08-28 17:39:09 +02:00
files.te Bump module versions for release. 2021-02-03 08:38:26 -05:00
filesystem.fc filesystem: pathcon for matching tracefs mount 2020-05-27 11:51:36 +02:00
filesystem.if Allow systemd to relabel startup-important directories 2021-02-09 13:24:49 +01:00
filesystem.te Bump module versions for release. 2021-02-03 08:38:26 -05:00
kernel.fc
kernel.if Allow use of systemd UNIX sockets created at initrd execution 2021-02-09 13:24:51 +01:00
kernel.te Bump module versions for release. 2021-02-03 08:38:26 -05:00
mcs.fc
mcs.if
mcs.te
metadata.xml
mls.fc
mls.if remove deprecated from 20190201 2021-01-25 08:59:34 -05:00
mls.te Bump module versions for release. 2021-02-03 08:38:26 -05:00
selinux.fc
selinux.if selinux: add selinux_get_all_booleans() interface 2020-12-15 15:19:30 +00:00
selinux.te Bump module versions for release. 2021-02-03 08:38:26 -05:00
storage.fc devices, storage: Add fc entries for mtd char devices and ndctl devices. 2019-07-16 16:38:43 -04:00
storage.if Fix several misspellings 2020-08-13 14:08:58 +02:00
storage.te Bump module versions for release. 2021-02-03 08:38:26 -05:00
terminal.fc Remove old exception 2020-02-23 17:52:54 +01:00
terminal.if Remove modules for programs that are deprecated or no longer supported. 2021-01-14 17:14:30 -05:00
terminal.te Bump module versions for release. 2021-02-03 08:38:26 -05:00
ubac.fc
ubac.if
ubac.te whitespace cleanup 2020-08-13 14:34:57 +02:00