2012-02-13 10:06:06 +00:00
|
|
|
--- src/xcb_auth.c.orig 2009-05-29 17:48:24.000000000 +0200
|
|
|
|
+++ src/xcb_auth.c 2009-05-29 17:56:01.000000000 +0200
|
2018-01-05 11:15:21 +00:00
|
|
|
@@ -119,2 +119,3 @@ static Xauth *get_authptr(struct sockadd
|
2012-02-13 10:06:06 +00:00
|
|
|
int dispbuflen;
|
|
|
|
+ Xauth *authptr = NULL;
|
|
|
|
|
2018-01-05 11:15:21 +00:00
|
|
|
@@ -163,6 +163,16 @@ static Xauth *get_authptr(struct sockadd
|
2012-02-13 10:06:06 +00:00
|
|
|
|
|
|
|
- return XauGetBestAuthByAddr (family,
|
|
|
|
+ authptr = XauGetBestAuthByAddr (family,
|
2018-01-05 11:15:21 +00:00
|
|
|
(unsigned short) addrlen, addr,
|
|
|
|
(unsigned short) dispbuflen, dispbuf,
|
|
|
|
N_AUTH_PROTOS, authnames, authnameslen);
|
2012-02-13 10:06:06 +00:00
|
|
|
+ // && !phostname
|
|
|
|
+ if ((!authptr || !authptr->data_length) && family == FamilyLocal) {
|
2018-01-05 11:15:21 +00:00
|
|
|
+ if ( (addr = getenv("XAUTHLOCALHOSTNAME")) ) {
|
|
|
|
+ authptr = XauGetBestAuthByAddr (family,
|
|
|
|
+ (unsigned short) strlen(addr), addr,
|
|
|
|
+ (unsigned short) dispbuflen, dispbuf,
|
|
|
|
+ N_AUTH_PROTOS, authnames, authnameslen);
|
|
|
|
+ }
|
2012-02-13 10:06:06 +00:00
|
|
|
+ }
|
|
|
|
+ return authptr;
|
|
|
|
}
|