]> git.ipfire.org Git - thirdparty/util-linux.git/commit
wall: use xgetlogin.
authorÉrico Nogueira <erico.erc@gmail.com>
Wed, 28 Jul 2021 02:51:34 +0000 (23:51 -0300)
committerKarel Zak <kzak@redhat.com>
Thu, 29 Jul 2021 19:40:33 +0000 (21:40 +0200)
commit5cc21d91fc8c67b1e727e8ba0cb81d0846c2e17b
treed1a382fe15bac51561ad54bad8b7ec829f736e2f
parentbca77acb03cad888441e697082472f632a0941d5
wall: use xgetlogin.

getlogin(3) shouldn't be used for identification here. This also removes
the bug where a missing entry for getuid() in passwd database wouldn't
print a warning, because whom would be set to "???".

For consistency, switch to "<someone>" when pw look up fails.

Signed-off-by: Érico Nogueira <erico.erc@gmail.com>
term-utils/wall.c