diff options
author | Debian Python Modules Team <python-modules-team@lists.alioth.debian.org> | 2020-04-12 16:12:10 +0200 |
---|---|---|
committer | Andrej Shadura <andrewsh@debian.org> | 2020-04-12 16:12:10 +0200 |
commit | 931a9d03840f93c3f27ac1447490374ed110a386 (patch) | |
tree | 4c0f7e69775be4e98e96d1660e79dca703251502 | |
parent | 9bdb875edd6909bbd72d7c256996d3b7c6dcdaad (diff) |
fix-ssh-tunnel-auth
Gbp-Pq: Name fix-ssh-tunnel-auth.patch
-rw-r--r-- | Xlib/support/unix_connect.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Xlib/support/unix_connect.py b/Xlib/support/unix_connect.py index 4112c0f..f8561b7 100644 --- a/Xlib/support/unix_connect.py +++ b/Xlib/support/unix_connect.py @@ -201,6 +201,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
|