in reply to Re^6: getlogin works on debian but not ubuntu?
in thread getlogin works on debian but not ubuntu?
Maybe it's the same thing as this? https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/1067779Strange. My netbook has the very same distribution, my /proc/self/loginuid contains UINT_MAX, but stuff still works. strace tells me that instead of reading /proc/self/loginuid (which on some Linuxes such as my Gentoo doesn't even exist) it checks the /proc/self/fd/0 link to find the terminal the program is running on and then checks /var/run/utmpx or /var/run/utmp for the user logged in on that terminal. The weird thing is that there is no trace of getutent() or something in my glibc's getlogin() implementation. I haven't found whether it gets vendor-patched in somewhere or why else that might be.
|
|---|