Package: python-xlib / 0.23-2

fix-ssh-tunnel-auth.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Index: trunk/Xlib/support/unix_connect.py
===================================================================
--- trunk.orig/Xlib/support/unix_connect.py	2009-11-05 06:06:09.000000000 -0500
+++ trunk/Xlib/support/unix_connect.py	2009-11-05 06:06:23.000000000 -0500
@@ -161,6 +161,14 @@
     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