GNU bug report logs - #48894
ambiguous descriptions of logname and whoami

Previous Next

Package: coreutils;

Reported by: Christoph Anton Mitterer <calestyo <at> scientia.net>

Date: Mon, 7 Jun 2021 01:50:01 UTC

Severity: normal

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Pádraig Brady <P <at> draigBrady.com>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#48894: closed (ambiguous descriptions of logname and whoami)
Date: Wed, 15 Sep 2021 14:29:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Wed, 15 Sep 2021 15:28:38 +0100
with message-id <53e08610-51ee-15b4-658d-9c040a9fc13b <at> draigBrady.com>
and subject line Re: bug#48894: ambiguous descriptions of logname and whoami
has caused the debbugs.gnu.org bug report #48894,
regarding ambiguous descriptions of logname and whoami
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
48894: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=48894
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Christoph Anton Mitterer <calestyo <at> scientia.net>
To: bug-coreutils <at> gnu.org
Subject: ambiguous descriptions of logname and whoami
Date: Mon, 07 Jun 2021 03:49:28 +0200
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).


Cheers,
Chris.



[Message part 3 (message/rfc822, inline)]
From: Pádraig Brady <P <at> draigBrady.com>
To: Christoph Anton Mitterer <calestyo <at> scientia.net>,
 48894-done <at> debbugs.gnu.org
Subject: Re: bug#48894: ambiguous descriptions of logname and whoami
Date: Wed, 15 Sep 2021 15:28:38 +0100
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


This bug report was last modified 3 years and 332 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.