mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-06-14 17:38:22 +02:00
systemd: create locked dbus user if possible
Since there is no need to log in as the dbus user, fully lock the account. The same is done with system users in systemd itself. The feature is available since systemd 257. Use if possible, otherwise stay with minimum version requirement 209. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
This commit is contained in:
parent
4f5796a37d
commit
5124febd8b
2 changed files with 6 additions and 1 deletions
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue