I wrote:
> Thus, on Linux systems, a correct implementation of getlogin() can not
> distinguish different users with the same uid (with reasonable effort).
> This applies to both glibc and the new code in gnulib.
Let me document this limitation.
2025-03-10 Bruno Haible
getlogin, getl
On 2025-03-09 11:49, Bruno Haible wrote:
Nicolas Boos wrote:
This page says that the result of the logname command and the LOGNAME
variable must be the same:
https://www.ibm.com/docs/en/aix/7.3?topic=l-logname-command
An AIX man page is not a specification for what we run on GNU systems.
Plus
Nicolas Boos wrote:
> This page says that the result of the logname command and the LOGNAME
> variable must be the same:
> https://www.ibm.com/docs/en/aix/7.3?topic=l-logname-command
An AIX man page is not a specification for what we run on GNU systems.
> Thus, getlogin() implementations that use
This page says that the result of the logname command and the LOGNAME
variable must be the same:
https://www.ibm.com/docs/en/aix/7.3?topic=l-logname-command
Thus, getlogin() implementations that use the LOGNAME or login_name
variables such as musl, uclibc or even gnulib WIN32 seems fine.
What t
I wrote:
> With this, coreutils should be fine, since it already imports the 'getlogin'
> module from gnulib.
Verified by comparing coreutils-9.5 with coreutils-HEAD on Alpine Linux 3.20:
With coreutils-9.5:
$ logname
bruno
$ su -
Password:
# logname
root
Now:
$ logname
bruno
$ su -
Password:
On 09/03/2025 11:08, Bruno Haible via Gnulib discussion list wrote:
I wrote:
With this, coreutils should be fine, since it already imports the 'getlogin'
module from gnulib.
Verified by comparing coreutils-9.5 with coreutils-HEAD on Alpine Linux 3.20:
With coreutils-9.5:
$ logname
bruno
$ su
Paul Eggert wrote:
> In the meantime I installed the attached to Gnulib, to
> document the incompatibility, which also occurs with getlogin_r.
These two patches actually work around the bugs.
With this, coreutils should be fine, since it already imports the 'getlogin'
module from gnulib.
2025-