From 569a837d8dd161d7b28c9ec34d6e2a7c9e5e1ee2 Mon Sep 17 00:00:00 2001 From: Zdenek Pytela Date: Tue, 15 Oct 2024 22:36:10 +0200 Subject: [PATCH] Allow systemd-homework write to init pid socket The commit addresses the following AVC denial: type=AVC msg=audit(10/14/2024 13:09:30.759:7891) : avc: denied { write } for pid=265995 comm=systemd-homewor name=private dev="tmpfs" ino=810 scontext=system_u:system_r:systemd_homework_t:s0 tcontext=system_u:object_r:init_var_run_t:s0 tclass=sock_file permissive=0 type=SYSCALL msg=audit(10/14/2024 13:09:30.759:7891) : arch=x86_64 syscall=connect success=no exit=EACCES(Permission denied) a0=0x4 a1=0x55c125954158 a2=0x17 a3=0x7fff26a89604 items=1 ppid=760 pid=265995 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=systemd-homewor exe=/usr/lib/systemd/systemd-homework subj=system_u:system_r:systemd_homework_t:s0 key=(null) type=SOCKADDR msg=audit(10/14/2024 13:09:30.759:7891) : saddr={ saddr_fam=local path=/run/systemd/private } type=PATH msg=audit(10/14/2024 13:09:30.759:7891) : item=0 name=/run/systemd/private inode=810 dev=00:1b mode=socket,700 ouid=root ogid=root rdev=00: --- policy/modules/system/systemd-homed.te | 1 + 1 file changed, 1 insertion(+) diff --git a/policy/modules/system/systemd-homed.te b/policy/modules/system/systemd-homed.te index f11e1a6431..461597e338 100644 --- a/policy/modules/system/systemd-homed.te +++ b/policy/modules/system/systemd-homed.te @@ -227,6 +227,7 @@ fsadm_manage_pid(systemd_homework_t) init_read_state(systemd_homework_t) init_rw_stream_sockets(systemd_homework_t) +init_write_pid_socket(systemd_homework_t) storage_raw_read_removable_device(systemd_homework_t) storage_rw_inherited_removable_device(systemd_homework_t)