]> git.ipfire.org Git - thirdparty/util-linux.git/commit
logger: use xgetlogin from pwdutils.
authorÉrico Nogueira <erico.erc@gmail.com>
Wed, 28 Jul 2021 02:54:42 +0000 (23:54 -0300)
committerKarel Zak <kzak@redhat.com>
Thu, 29 Jul 2021 19:40:33 +0000 (21:40 +0200)
commit8ab700b933caf18cb4547ea01bdcb1387a1145a1
treeefc8198a972000d768d9be7c719c2bb5f4a190e1
parent5cc21d91fc8c67b1e727e8ba0cb81d0846c2e17b
logger: use xgetlogin from pwdutils.

It defined its own xgetlogin, which queried geteuid() instead of getuid(),
with a fallback to "<someone>" when lookup fails. This has been the case
since the function was introduced in
019b97024fde3f07eaf541eef990762483369a11, so geteuid() has always been
used. Since using geteuid for identification isn't consistent with the
rest of util-linux, switching to xgetlogin(), which uses getuid(),
should be correct.

Signed-off-by: Érico Nogueira <erico.erc@gmail.com>
misc-utils/Makemodule.am
misc-utils/logger.c