diff options
author | Ulrich Drepper <drepper@redhat.com> | 2010-03-24 17:02:57 -0700 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2010-03-24 17:02:57 -0700 |
commit | c8727fa6e5073d28ed6d0eb40a006ac2c1b9f9f3 (patch) | |
tree | 23369e9301bb60abd73e4384e7974fa32acd6e57 /ChangeLog | |
parent | fd8ccb0427569ffdfbb70c8828029122f3459160 (diff) | |
download | glibc-c8727fa6e5073d28ed6d0eb40a006ac2c1b9f9f3.zip glibc-c8727fa6e5073d28ed6d0eb40a006ac2c1b9f9f3.tar.gz glibc-c8727fa6e5073d28ed6d0eb40a006ac2c1b9f9f3.tar.bz2 |
Fix Linux getlogin{_r,} implementation
The old implementation uses fd 0 to determine the login TTY. This
was needed because using /dev/tty it is not possible to deduce the
login TTY. For some time now there is the pseudo-file
/proc/self/loginuid which directly helps us to find the user. Prefer
using this file. It also works if stdin is closed, redirected, or
re-opened.
Diffstat (limited to 'ChangeLog')
-rw-r--r-- | ChangeLog | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -1,5 +1,12 @@ 2010-03-24 Ulrich Drepper <drepper@redhat.com> + * sysdeps/unix/sysv/linux/getlogin_r.c: New file. + * sysdeps/unix/sysv/linux/getlogin.c: New file. + * sysdeps/unix/getlogin_r.c: Allow compiling getlogin as static + function. + * sysdeps/unix/getlogin.c: Likewise. Move name variable to toplevel. + * include/unistd.h: Declare __getlogin_r_loginuid. + [BZ #11397] * sysdeps/posix/cuserid.c (cuserid): Make sure the returned string is NUL terminated. |