init: Add homectl dbus access.

homectl is used in the systemd-homed-activate.service ExecStop.

Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
This commit is contained in:
Chris PeBenito 2024-05-07 09:18:57 -04:00
parent 7d998958dc
commit 6daf602382
2 changed files with 25 additions and 0 deletions

View File

@ -1197,6 +1197,10 @@ ifdef(`init_systemd',`
# create /var/lock/lvm/
lvm_create_lock_dirs(initrc_t)
')
optional_policy(`
systemd_dbus_chat_homed(initrc_t)
')
')
optional_policy(`

View File

@ -1113,6 +1113,27 @@ interface(`systemd_PrivateDevices',`
fs_read_tmpfs_symlinks($1)
')
########################################
## <summary>
## Send and receive messages from
## systemd homed over dbus.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`systemd_dbus_chat_homed',`
gen_require(`
type systemd_homed_t;
class dbus send_msg;
')
allow $1 systemd_homed_t:dbus send_msg;
allow systemd_homed_t $1:dbus send_msg;
')
######################################
## <summary>
## Read and write systemd-homework semaphores.