File: fix-ssh-tunnel-auth.patch

package info (click to toggle)
python-xlib 0.33-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,040 kB
  • sloc: python: 23,022; awk: 89; makefile: 60; sh: 10
file content (18 lines) | stat: -rw-r--r-- 767 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Index: python-xlib/Xlib/support/unix_connect.py
===================================================================
--- python-xlib.orig/Xlib/support/unix_connect.py	2022-12-30 20:47:39.970961940 -0300
+++ python-xlib/Xlib/support/unix_connect.py	2022-12-30 20:50:19.204944041 -0300
@@ -211,6 +211,13 @@
                 auth_data = auth
     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