From: Pádraig Brady
Date: Wed, 15 Sep 2021 14:21:06 +0000 (+0100) Subject: doc: fix ambiguities in logname(1) and whoami(1) X-Git-Tag: v9.0~45 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f76a568313b41ab649af60ae5ca1c4811208d379;p=thirdparty%2Fcoreutils.git 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 --- diff --git a/doc/coreutils.texi b/doc/coreutils.texi index d77bcc0c23..882aa26aba 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -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 diff --git a/man/logname.x b/man/logname.x index 997a1b7bca..83dbc066f9 100644 --- a/man/logname.x +++ b/man/logname.x @@ -2,3 +2,5 @@ logname \- print user\'s login name [DESCRIPTION] .\" Add any additional description here +[SEE ALSO] +getlogin(3) diff --git a/man/whoami.x b/man/whoami.x index 7ee371a3de..e7521e5cb4 100644 --- a/man/whoami.x +++ b/man/whoami.x @@ -1,4 +1,4 @@ [NAME] -whoami \- print effective userid +whoami \- print effective user name [DESCRIPTION] .\" Add any additional description here diff --git a/src/logname.c b/src/logname.c index cf98bfc666..8d1b0f18d6 100644 --- a/src/logname.c +++ b/src/logname.c @@ -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);