]> git.ipfire.org Git - thirdparty/util-linux.git/commit
wall: always use utmp as fallback
authorKarel Zak <kzak@redhat.com>
Mon, 3 Jun 2024 12:32:18 +0000 (14:32 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 3 Jun 2024 12:41:35 +0000 (14:41 +0200)
commit0af497c6688b53a3a176176bfbcdca821bd856ec
tree69b17fea03f492b1fa1231bad5b93dfc4d5ace88
parent0284eb3a8a6505dd9745b042089046ad368bfe74
wall: always use utmp as fallback

Wall(1) can be compiled with systemd support to read the names of ttys
from the systemd session list. However, this may not work on all systems.
In case of failure, the best option is to use the traditional
utmp method as a fallback.

This commit uses strv (string vector) to collect tty names from both
sources (systemd and utmp) and then sends a message to all ttys.

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2283049
Signed-off-by: Karel Zak <kzak@redhat.com>
term-utils/wall.c