OpenSSH
[Top] [All Lists]

Re: X forwarding: trying to forward to busy local port

To: openssh-unix-dev@mindrot.org
Subject: Re: X forwarding: trying to forward to busy local port
From: Marc Aurele La France <tsi@ualberta.ca>
Date: Thu, 15 Feb 2007 09:06:22 -0700 (Mountain Standard Time)
Cc: Lars Kruse <kruse@silicann.com>
Delivered-to: sp-com-lists@consult.net
Delivered-to: openssh-unix-dev-list1@securepoint.com
Delivered-to: openssh-unix-dev-tmda@mindrot.org
Delivered-to: openssh-unix-dev@mindrot.org
In-reply-to: <45D36FC4.7040708@zip.com.au>
List-archive: <http://lists.mindrot.org/pipermail/openssh-unix-dev>
List-help: <mailto:openssh-unix-dev-request@mindrot.org?subject=help>
List-id: Development of portable OpenSSH <openssh-unix-dev.mindrot.org>
List-post: <mailto:openssh-unix-dev@mindrot.org>
List-subscribe: <http://lists.mindrot.org/mailman/listinfo/openssh-unix-dev>, <mailto:openssh-unix-dev-request@mindrot.org?subject=subscribe>
List-unsubscribe: <http://lists.mindrot.org/mailman/listinfo/openssh-unix-dev>, <mailto:openssh-unix-dev-request@mindrot.org?subject=unsubscribe>
References: <20070201162824.6d5f8b77@jackdaw.neusy> <20070213114912.5d3a76a4@jackdaw.neusy> <20070213113532.GA31234@gate.dtucker.net> <20070214114322.32877003@jackdaw.neusy> <45D2FE32.2050900@zip.com.au> <Pine.WNT.4.64.0702140755520.2024@cluij.ucs.ualberta.ca> <45D36FC4.7040708@zip.com.au>
Sender: openssh-unix-dev-bounces+openssh-unix-dev-list1=securepoint.com@mindrot.org
On Thu, 15 Feb 2007, Darren Tucker wrote:
> Marc Aurele La France wrote:
>> On Wed, 14 Feb 2007, Darren Tucker wrote:
>>> The wrinkle is that some xlibs (or xauths?) do special things with the
>>> string "localhost", eg map it to a Unix domain socket.

>> This isn't so, except perhaps for some proprietary X implementations.  In
>> fact, display names of "localhost:<n>", instead of ":<n>" force the use of
>> TCP/IP.  This is so for both XFree86 and X.Org.

> That's interesting, because it means there's something going on here
> that I don't understand.

> When X11UseLocalhost=yes, sshd adds a unix: cookie and sets DISPLAY to
> "localhost:n.0"

> So for example, on OpenBSD-current, when I logged in sshd ran this:

> xauth add unix:10.0 MIT-MAGIC-COOKIE-1 f270ce6e3b353e5ad8070b4ecab4c604

> and after I logged in I see this:
> $ echo $DISPLAY
> localhost:10.0
> $ xauth list
> quoll.dtucker.net/unix:10 MIT-MAGIC-COOKIE-1
> f270ce6e3b353e5ad8070b4ecab4c604

> So when I run "xterm" how does it find the right cookie given that
> $DISPLAY and the xauth data are not identical?

xauth data is used to authenticate with the server, and, as such, how the 
connection with that server is made is irrelevant.  Thus, the `xauth add` 
told the server at localhost:10.0 to add an authorisation for unix:10.0, 
which that server knows is itself.

Marc.

+----------------------------------+----------------------------------+
|  Marc Aurele La France           |  work:   1-780-492-9310          |
|  Academic Information and        |  fax:    1-780-492-1729          |
|    Communications Technologies   |  email:  tsi@ualberta.ca         |
|  352 General Services Building   +----------------------------------+
|  University of Alberta           |                                  |
|  Edmonton, Alberta               |    Standard disclaimers apply    |
|  T6G 2H1                         |                                  |
|  CANADA                          |                                  |
+----------------------------------+----------------------------------+
XFree86 developer and VP.  ATI driver and X server internals.
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
http://lists.mindrot.org/mailman/listinfo/openssh-unix-dev

<Prev in Thread] Current Thread [Next in Thread>