package/systemd: reenable utmp support

This patch provides a way to enable utmp support when using systemd,
with it disabled by default, as some security concerns may apply. Still,
there are cases where having utmp is desirable, even though it is rare,
so let's make this configurable.

See commit 32f53bdfb4.

Signed-off-by: Casey Reeves <casey@xogium.me>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
This commit is contained in:
Casey Reeves 2023-01-18 20:49:25 +01:00 committed by Yann E. MORIN
parent f090116066
commit e6789e8b8b
2 changed files with 27 additions and 2 deletions

View File

@ -518,6 +518,26 @@ config BR2_PACKAGE_SYSTEMD_USERDB
https://www.freedesktop.org/software/systemd/man/systemd-userdbd.service.html
config BR2_PACKAGE_SYSTEMD_UTMP
bool "enable utmp support"
help
systemd-update-utmp-runlevel.service is a service that writes
SysV runlevel changes to utmp and wtmp, as well as the audit
logs, as they occur. systemd-update-utmp.service does the
same for system reboots and shutdown requests.
https://www.freedesktop.org/software/systemd/man/systemd-update-utmp.service.html
Utmp keeps track of what users do on the system (where they
logged from, on which terminal, ...) along with a general
status of the system (list of reboots, current uptime, current
number of users logged in).
You should only enable this if your system will have actual
users who log in.
https://man7.org/linux/man-pages/man5/utmp.5.html
config BR2_PACKAGE_SYSTEMD_VCONSOLE
bool "enable vconsole tool"
default y

View File

@ -87,8 +87,7 @@ SYSTEMD_CONF_OPTS += \
-Dtelinit-path= \
-Dtests=false \
-Dtmpfiles=true \
-Dumount-path=/usr/bin/umount \
-Dutmp=false
-Dumount-path=/usr/bin/umount
SYSTEMD_CFLAGS = $(TARGET_CFLAGS)
ifeq ($(BR2_OPTIMIZE_FAST),y)
@ -331,6 +330,12 @@ else
SYSTEMD_CONF_OPTS += -Dbinfmt=false
endif
ifeq ($(BR2_PACKAGE_SYSTEMD_UTMP),y)
SYSTEMD_CONF_OPTS += -Dutmp=true
else
SYSTEMD_CONF_OPTS += -Dutmp=false
endif
ifeq ($(BR2_PACKAGE_SYSTEMD_VCONSOLE),y)
SYSTEMD_CONF_OPTS += -Dvconsole=true
else