doc: fix ambiguities in logname(1) and whoami(1)

* doc/coreutils.texi (whoami invocation): Clarify it prints names,
not numeric IDs.
* man/whoami.x: Likewise.
* man/logname.x: Reference getlogin(3).
* src/logname.c: Clarify that it prints the login name,
rather than the name of the effective user ID.

Fixes https://bugs.gnu.org/48894
This commit is contained in:
Pádraig Brady 2021-09-15 15:21:06 +01:00
parent 7f303de877
commit f76a568313
4 changed files with 6 additions and 4 deletions

View File

@ -15643,10 +15643,10 @@ options}.
@node whoami invocation
@section @command{whoami}: Print effective user ID
@section @command{whoami}: Print effective user name
@pindex whoami
@cindex effective user ID, printing
@cindex effective user name, printing
@cindex printing the effective user ID
@command{whoami} prints the user name associated with the current

View File

@ -2,3 +2,5 @@
logname \- print user\'s login name
[DESCRIPTION]
.\" Add any additional description here
[SEE ALSO]
getlogin(3)

View File

@ -1,4 +1,4 @@
[NAME]
whoami \- print effective userid
whoami \- print effective user name
[DESCRIPTION]
.\" Add any additional description here

View File

@ -38,7 +38,7 @@ usage (int status)
{
printf (_("Usage: %s [OPTION]\n"), program_name);
fputs (_("\
Print the name of the current user.\n\
Print the user's login name.\n\
\n\
"), stdout);
fputs (HELP_OPTION_DESCRIPTION, stdout);