]> git.ipfire.org Git - thirdparty/glibc.git/commit
Linux: In getlogin_r, use utmp fallback only for specific errors
authorFlorian Weimer <fweimer@redhat.com>
Fri, 13 Feb 2026 08:02:07 +0000 (09:02 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Fri, 13 Feb 2026 08:02:07 +0000 (09:02 +0100)
commit28660f4b45afa8921c2faebaec2846f95f670ba0
tree8ba806f08a29b93c348641f373e074b214ef3690
parent7bb859f4198d0be19c31a9937eae4f6c2c9a079e
Linux: In getlogin_r, use utmp fallback only for specific errors

Most importantly, if getwpuid_r fails, it does not make sense to retry
via utmp because the user ID obtained from there is less reliable than
the one from /proc/self/loginuid.

Reviewed-by: Sam James <sam@gentoo.org>
sysdeps/unix/sysv/linux/getlogin_r.c