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 555464 - xauth cookie errors when system hostname changes while gdm starts
xauth cookie errors when system hostname changes while gdm starts
Status: RESOLVED NOTGNOME
Product: gdm
Classification: Core
Component: general
2.22.x
Other Linux
: Normal normal
: ---
Assigned To: GDM maintainers
GDM maintainers
Depends on:
Blocks:
 
 
Reported: 2008-10-07 21:16 UTC by Fabrice Bellet
Modified: 2010-03-21 15:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use localhost and XAUTHLOCALHOSTNAME env var (3.34 KB, patch)
2009-09-28 12:58 UTC, Vincent Untz
none Details | Review

Description Fabrice Bellet 2008-10-07 21:16:09 UTC
This bug appears since recent changes in NetworkManager, that modify the system hostname from localhost.localdomain to the "new" hostname of the machine depending on the DNS lookup of the IP address obtained from the dhcp lease, after network connection is established (the new hostname now resolves to 127.0.0.1, as /etc/hosts is updated accordingly by NM).

There's a race condition here :

1. NM starts and sets the default hostname to localhost.localdomain
2. gdm starts, and creates an xauth cookie with localhost.localdomain as hostname
3. NM obtains a dhcp lease, and changes system hostname to something else.
4. following attempts of gdm to connect to the X server fail with authentication errors

(details and logs in #554495)

dcbw suggests to not use system hostname as the xauth cookie in gdm.
Comment 1 Ray Strode [halfline] 2008-10-07 21:33:51 UTC
So network manager shouldn't be changing the hostname at runtime.  It's going to break all kinds of things.

We can just force "localhost" instead the auth cookie though.
Comment 2 Ray Strode [halfline] 2008-10-07 21:34:06 UTC
s/instead/into/
Comment 3 Vincent Untz 2009-09-28 12:58:48 UTC
Created attachment 144173 [details] [review]
Use localhost and XAUTHLOCALHOSTNAME env var

We have the same issue in openSUSE, and here's the solution we use: we use localhost as hostname (for local logins) and set XAUTHLOCALHOSTNAME to make sure it's always the one that gets used by X.
Comment 4 Vincent Untz 2009-09-30 16:13:01 UTC
Hrm. XAUTHLOCALHOSTNAME is not upstream, it looks it's something specific to the openSUSE X packages. Sigh.
Comment 5 Ray Strode [halfline] 2009-10-28 03:49:01 UTC
hmm we actually fixed this a while ago...

http://git.gnome.org/cgit/gdm/commit/?id=8e1036b9a6fb5b7d7b62686293f79d249ca99121

Are you still seeing the problem, Vincent, or is attachment 144173 [details] [review] obsolete?
Comment 6 Tobias Mueller 2010-03-21 14:03:51 UTC
Vincent, could you please comment on Rays question in comment #5? TIA!
Comment 7 Vincent Untz 2010-03-21 15:51:06 UTC
This is still needed, but since XAUTHLOCALHOSTNAME is openSUSE-specific, I guess closing as NOTGNOME is probably the best thing to do...