After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 301821 - gdm should seteuid/setegid to user before checking for existance of user's homedir
gdm should seteuid/setegid to user before checking for existance of user's ho...
Status: RESOLVED FIXED
Product: gdm
Classification: Core
Component: general
2.6.0.x
Other Linux
: Normal normal
: ---
Assigned To: GDM maintainers
GDM maintainers
Depends on:
Blocks:
 
 
Reported: 2005-04-24 20:01 UTC by Ray Strode [halfline]
Modified: 2005-06-26 14:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
change to user before testing for existance of user's home directory. (822 bytes, patch)
2005-04-24 20:04 UTC, Ray Strode [halfline]
none Details | Review
Remote redundant seteuid/setegid calls (559 bytes, patch)
2005-06-10 22:51 UTC, Pawel Worach
none Details | Review

Description Ray Strode [halfline] 2005-04-24 20:01:14 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.
Comment 1 Ray Strode [halfline] 2005-04-24 20:04:12 UTC
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.
Comment 2 Brian Cameron 2005-04-25 19:14:23 UTC
Looks good.  Fixed in CVS head.
Comment 3 Pawel Worach 2005-06-10 22:50:47 UTC
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) ?
Comment 4 Pawel Worach 2005-06-10 22:51:55 UTC
Created attachment 47588 [details] [review]
Remote redundant seteuid/setegid calls
Comment 5 Pawel Worach 2005-06-26 14:14:16 UTC
Comment on attachment 47588 [details] [review]
Remote redundant seteuid/setegid calls

Bad patch, see bug 308050
Comment 6 Pawel Worach 2005-06-26 14:16:44 UTC
Resolve, fixed by bug 308050