diff --git a/bus/sysusers.d/dbus.conf.in b/bus/sysusers.d/dbus.conf.in index fb35702d..92c815d5 100644 --- a/bus/sysusers.d/dbus.conf.in +++ b/bus/sysusers.d/dbus.conf.in @@ -2,4 +2,4 @@ # at boot on systemd-based systems that ship with an unpopulated # /etc. See sysusers.d(5) for details. -u @DBUS_USER@ - "System Message Bus" +u@DBUS_USER_LOCK@ @DBUS_USER@ - "System Message Bus" diff --git a/meson.build b/meson.build index 7281b7ec..9e6479db 100644 --- a/meson.build +++ b/meson.build @@ -549,6 +549,11 @@ if use_systemd : '/usr/lib/systemd/user' ) endif + + # Version 257 and above support locked system accounts; use if available. + if systemd.version().version_compare('>=257') + data_config.set('DBUS_USER_LOCK', '!') + endif else systemctl = '' endif