tags 296468 + patch
thanks

That's because $DISPLAY typically is set to localhost:10.0, which means
that sux will ask xauth for the cookies for localhost/unix:10.0, but the
relevant cookie is stored in .Xauthority under <hostname>/unix:10.0. I'm
not sure what the correct solution is, but replacing "localhost" with
$HOST (or `hostname` to be sure) or "" should work.

(See line 201 and forward.)

There is a similar problem in lines 189 and 190, when --untrusted is
used. I suggest removing $DISPLAY from line 190, since the temporary
file only contains cookies for that one $DISPLAY anyway.

My proposed patch:

--- /usr/bin/sux        2003-10-24 00:28:41.000000000 +0200
+++ sux 2005-06-01 15:21:51.990018875 +0200
@@ -188,5 +188,5 @@
   sux_tmpfile=`tempfile -p sux`
   xauth -q -f $sux_tmpfile generate $DISPLAY . $sux_untrusted
$sux_timeout
-  sux_xauth_data=`xauth -f $sux_tmpfile nlist $DISPLAY`
+  sux_xauth_data=`xauth -f $sux_tmpfile nlist`
   rm -f $sux_tmpfile
 fi
@@ -201,5 +201,5 @@
   # If display is of the form "host:x.y" we may also need to get the
   # cookies for "host/unix:x.y".
-  sux_unix_display=`echo $DISPLAY | sed -e 's#^\([a-zA-Z_.][a-zA-Z_.]*
\):#\1/unix:#'`
+  sux_unix_display=`echo $DISPLAY | sed -e 's#^localhost:#:#;s#^
\([a-zA-Z_.][a-zA-Z_.]*\):#\1/unix:#'`
   if [ "$DISPLAY" = "$sux_unix_display" ]
   then

-- 
Magnus Holmgren
[EMAIL PROTECTED]



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to