]> git.ipfire.org Git - thirdparty/util-linux.git/commit
logger: do not rely only getlogin(3) telling who ran the command
authorSami Kerola <kerolasa@iki.fi>
Sun, 22 Jun 2014 22:29:36 +0000 (23:29 +0100)
committerSami Kerola <kerolasa@iki.fi>
Mon, 28 Jul 2014 20:15:16 +0000 (21:15 +0100)
commit019b97024fde3f07eaf541eef990762483369a11
treebcaa3132a939e2e63386a11a22bd4f17025974b8
parentd8b616c216113ba4986a9d537719e5f434dca18b
logger: do not rely only getlogin(3) telling who ran the command

The getlogin(3) is known not to always work, and when that happens it is
reasonable to try determine user of name by looking process owner and
passwd information.

Reference: http://man7.org/linux/man-pages/man3/getlogin.3.html
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
misc-utils/logger.c