summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDebian Python Modules Team <python-modules-team@lists.alioth.debian.org>2018-07-21 15:19:18 +0200
committerAndrej Shadura <andrewsh@debian.org>2018-07-21 15:19:18 +0200
commitae4551298433d39d91b43e99458e14dc3b61c928 (patch)
treed34ef53473f4c7c5687e2047819871d4153df1f3
parentf7323ea59fe3272dee3d1d0cb6463901933bd3fd (diff)
fix-ssh-tunnel-auth
=================================================================== Gbp-Pq: Name fix-ssh-tunnel-auth.patch
-rw-r--r--Xlib/support/unix_connect.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Xlib/support/unix_connect.py b/Xlib/support/unix_connect.py
index 25a8f3a..2b25bc9 100644
--- a/Xlib/support/unix_connect.py
+++ b/Xlib/support/unix_connect.py
@@ -186,6 +186,14 @@ def old_get_auth(sock, dname, host, dno):
except os.error:
pass
+ if not auth_data and host=='localhost':
+ # 127.0.0.1 counts as FamilyLocal, not FamilyInternet
+ # See Xtransutil.c:ConvertAddress.
+ # There might be more ways to spell 127.0.0.1 but
+ # 'localhost', yet this code fixes a the case of
+ # OpenSSH tunneling X.
+ return get_auth('unix:%d' % dno, 'unix', dno)
+
return auth_name, auth_data
get_auth = new_get_auth