Add user,group when systemd tmpfiles creates localstatedir

Systemd uses tmpfiles mechanism to create /var/lib/dbus during runtime.
The user:group for directories created by tmpfiles defaults to the user
invoking systemd-tmpfiles when "-" is given, which would be by default
root root causing permission mismatch.
Assigning user and group to DBUS_USER to make sure that ${localstatedir}/lib/dbus
is created with the right user:group as DBUS_USER or default (messagebus)

Signed-off-by: Vishwas Udupa <vudupa@qti.qualcomm.com>
This commit is contained in:
Vishwas Udupa 2025-12-07 22:10:30 -08:00
parent 1bcf396c78
commit 25fc6b76c2

View file

@ -2,7 +2,7 @@
# Make ${localstatedir}/lib/dbus (required for systemd < 237)
# Adjust mode and ownership if it already exists.
d @EXPANDED_LOCALSTATEDIR@/lib/dbus 0755 - - -
d @EXPANDED_LOCALSTATEDIR@/lib/dbus @DBUS_USER@ @DBUS_USER@ 0755 - - -
# Make ${localstatedir}/lib/dbus/machine-id a symlink to /etc/machine-id
# if it does not already exist