[clx-devel] get-best-authorization and localhost/unix:0
Raymond Toy
toy.raymond at gmail.com
Tue Nov 16 18:40:10 UTC 2010
Ran into the following issue with the current clx (running on cmucl).
On my linux system, the xauth file (created by the system, not me) has
only one entry for localhost/unix:0. When I try to open-clx-display, it
fails because get-best-authorization can't find the authorization data.
The problem is that when the protocol is :local, get-best-auth looks up
the hostname and sets host-address to that. The hostname isn't
"localhost", so nothing matches.
Here is a proposed patch. The patch works for me, but I'm not sure if
it is the right thing to do. Basically, in addition to matching
host-address to the xauth address, if the protocol is :local, allow a
match with "localhost".
Ray
Index: display.lisp
===================================================================
RCS file: /project/cmucl/cvsroot/src/clx/display.lisp,v
retrieving revision 1.15
diff -u -r1.15 display.lisp
--- display.lisp 13 Jul 2009 13:54:35 -0000 1.15
+++ display.lisp 16 Nov 2010 18:38:16 -0000
@@ -117,7 +117,9 @@
(read-xauth-entry stream)
(unless family (return))
(when (and (eql family protocol)
- (equal host-address address)
+ (or (equal host-address address)
+ (and (eql protocol :local)
+ (equal "localhost" address)))
(= number display)
(let ((pos1 (position name *known-authorizations*
:test #'string=)))
More information about the clx-devel
mailing list