8f7eece
Index: trunk/Xlib/support/unix_connect.py
8f7eece
===================================================================
8f7eece
--- trunk.orig/Xlib/support/unix_connect.py	2009-11-05 06:06:09.000000000 -0500
8f7eece
+++ trunk/Xlib/support/unix_connect.py	2009-11-05 06:06:23.000000000 -0500
8f7eece
@@ -161,6 +161,14 @@
8f7eece
     except os.error:
8f7eece
         pass
8f7eece
 
8f7eece
+    if not auth_data and host=='localhost':
8f7eece
+	# 127.0.0.1 counts as FamilyLocal, not FamilyInternet
8f7eece
+	# See Xtransutil.c:ConvertAddress.
8f7eece
+	# There might be more ways to spell 127.0.0.1 but
8f7eece
+	# 'localhost', yet this code fixes a the case of
8f7eece
+	# OpenSSH tunneling X.
8f7eece
+	return get_auth('unix:%d' % dno, 'unix', dno)
8f7eece
+
8f7eece
     return auth_name, auth_data
8f7eece
 
8f7eece
 get_auth = new_get_auth