Skip to content

Commit

Permalink
init: Add homectl dbus access.
Browse files Browse the repository at this point in the history
homectl is used in the systemd-homed-activate.service ExecStop.

Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
  • Loading branch information
pebenito committed May 7, 2024
1 parent 7d99895 commit 6daf602
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
4 changes: 4 additions & 0 deletions policy/modules/system/init.te
Original file line number Diff line number Diff line change
Expand Up @@ -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(`
Expand Down
21 changes: 21 additions & 0 deletions policy/modules/system/systemd.if
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 6daf602

Please sign in to comment.