When forwarding X11 connections, the DISPLAY variable should be set to match the appropriate interface when X11UseLocalhost is set to "no". Current behaviour is to set DISPLAY from a call to gethostname(), which may not return the wanted value, especially on multi-homed hosts. Attached is a patch against 20060208 which solves the problem by using the connected socket's IP.
Created attachment 1064 [details] Patch against 20060208 -- see bug report for details
Created attachment 1178 [details] Set $DISPLAY to match what xauth ends up using Alternative solution: make sshd set $DISPLAY according to what xauth ends up using. See the discussion thread here: http://marc.theaimsgroup.com/?l=openssh-unix-dev&m=114044767308984
OK, applied and tested against 4.4p1 this morning : the patch works as intended -- too bad I couldn't make it for the 4.4 release. I'm marking this as fixed
I think we might leave this open until we decide what to do with it. Closed bugs pass beyond the attention horizon pretty quick :-).
Hmmm... I thought 'resolved' and 'closed' were two different states -- I guess you need more feedback before applying this, which seems reasonable. Just tell me if I can provide some more testing on my side
We normally go to "resolved" when the patch is applied, then "closed" when the version with the patch is released. The means the list of "resolved" bugs is the ones we know about and have fixed but haven't yet made it into a release. At least that's the theory. We're not quite there yet. As far as this one goes, we need someone who understands the x11 forwarding better than me to think about whether or not this is the right thing to do (and then render an opinion thereon :-).
Retarget unresolved bugs/features to 6.0 release
Retarget unresolved bugs/features to 6.0 release (try again - bugzilla's "change several" isn't)
Retarget from 6.0 to 6.1
Retarget 6.0 => 6.1
Retarget uncompleted bugs from 6.1 => 6.2
Retarget bugs from 6.1 => 6.2
retarget to openssh-6.3
Retarget to openssh-6.4
Retarget 6.3 -> 6.4
Retarget incomplete bugs / feature requests to 6.6 release
Retarget to 6.7 release, since 6.6 was mostly bugfixing.
Remove from 6.6 tracking bug
Retarget incomplete bugs to 6.8 release.
These bugs are no longer targeted at the imminent 6.7 release
OpenSSH 6.8 is approaching release and closed for major work. Retarget these bugs for the next release.
Retarget to 6.9
Retarget pending bugs to openssh-7.1
Retarget to openssh-7.3
retarget unfinished bugs to next release
OpenSSH 7.4 release is closing; punt the bugs to 7.5
Move incomplete bugs to openssh-7.6 target since 7.5 shipped a while back. To calibrate expectations, there's little chance all of these are going to make 7.6.
remove 7.5 target
Comment on attachment 1178 [details] Set $DISPLAY to match what xauth ends up using The alternate patch has rotted a bit (since IPv6-capable X11 is slightly more of a thing now) but even if it were renovated to use getnameinfo() I still think this better matches what X11 will use.
Move to OpenSSH 7.8 tracking bug
Retarget remaining bugs planned for 7.8 release to 7.9
Retarget unfinished bugs to OpenSSH 8.0
Retarget outstanding bugs at next release
Retarget these bugs to 8.2 release
Prepare for 8.2 release; retarget bugs
Retarget bugs to 8.4 release
retarget to 8.6
retarget after 8.6p1 release