GNOME Bugzilla – Bug 301821
gdm should seteuid/setegid to user before checking for existance of user's homedir
Last modified: 2005-06-26 14:16:44 UTC
In some cases root may not be allowed to know about the existance of a user's home directory, when the user can. GDM performs a test to see if the user's home directory exists before allowing the user to login. It performs this test as root and so sometimes fails when the user should actually be allowed to login.
Created attachment 45623 [details] [review] change to user before testing for existance of user's home directory. See https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=149899 for more information.
Looks good. Fixed in CVS head.
It seems like this broke gdm on FreeBSD, there are now redundant seteuid() calls in daemon/slave.c:gdm_slave_session_start(). A ktrace looks like this with the second call failing. 1756 gdm-binary CALL seteuid(0x3e9) 1756 gdm-binary RET seteuid 0 1756 gdm-binary CALL seteuid(0x3e9) 1756 gdm-binary RET seteuid -1 errno 1 Operation not permitted I assume that the call should have been moved to before the $HOME check instead of another one added. Patch comming up to remove redundant call (runtime tested on FreeBSD 6.0-CURRENT). Do other platforms allow uid x to do seteuid(x) ?
Created attachment 47588 [details] [review] Remote redundant seteuid/setegid calls
Comment on attachment 47588 [details] [review] Remote redundant seteuid/setegid calls Bad patch, see bug 308050
Resolve, fixed by bug 308050