bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#48894: ambiguous descriptions of logname and whoami


From: Pádraig Brady
Subject: bug#48894: ambiguous descriptions of logname and whoami
Date: Wed, 15 Sep 2021 15:28:38 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:84.0) Gecko/20100101 Thunderbird/84.0

On 07/06/2021 02:49, Christoph Anton Mitterer wrote:
Hey.

Man page of logname say:
"Print the name of the current user."

IMO that's ambiguous as it's probably ought to be the name returned by
getlogin().

So when I login as normal user, and "su -" to root, logname won't print
"root" but the normal user.
However, what most people will understand under the "the current user"
would be root, in that case.



Man AND info pages of whoami say:
"print effective userid"

However, it's the user name, that is printed, not the userid (which
most people will understand as the numerical UID).

Fixed with: 
https://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=f76a56831

thanks!
Pádraig





reply via email to

[Prev in Thread] Current Thread [Next in Thread]