hostname change breaks X - how to connect 127.0.0.1 ?

Keith Packard keithp at keithp.com
Tue Aug 31 14:35:00 PDT 2004


Around 14 o'clock on Aug 31, Adam Jackson wrote:

> Alternatively you could hack the auth code to call gethostname(3) on every
> client connection, but I'd consider that to be suboptimal.

That's actually the reason things do break.  The problem is that Xauth 
encodes the hostname in the .Xauthority file so that a single .Xauthority 
file can be shared among multiple hosts (via SMB or NFS).  In today's 
world, that's patently stupid as transmitting the contents of that file 
over the network obviates the utility of any of the supported host-based 
authorization schemes.  (feel free to guess the author of the original 
.Xauthority file scheme...)

One trivial fix here would be to have an option in the display manager 
which generates this key to place an empty hostname in the file.  
XauGetBestAuthByAddr will match this for any hostname.

-keith


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20040831/54103a83/attachment.pgp>


More information about the xorg mailing list