You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
python-xlib/SOURCES/fix-ssh-tunnel-auth

49 lines
1.7 KiB

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
commit 95e9996cf86b08fa5af12190b71dd9067cc85270
Author: Orion Poplawski <orion@cora.nwra.com>
Date: Fri Sep 30 16:05:28 2016 -0600
Replace tabs with spaces
diff --git a/Xlib/support/unix_connect.py b/Xlib/support/unix_connect.py
index 677c36e..c1a2201 100644
--- a/Xlib/support/unix_connect.py
+++ b/Xlib/support/unix_connect.py
@@ -168,12 +168,12 @@ def old_get_auth(sock, dname, host, dno):
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)
+ # 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