Stefan Dirsch
a844b35e50
* gitlab CI: add a basic build test * configure.ac: drop dependency `pthread-stubs` on Solaris * configure.ac: Remove obsolete AC_HEADER_STDC * Raise minimum required version of Python from 2.6 to 3.0 * Fix windows build. * Fix indentation. * Fix a compiler warning * Fix handling of documented enum parameters * Allow full paths to sockets on non-macOS * DISPLAY starting with / or unix: is always a socket path * Add tests for unix socket parsing * autogen.sh: use quoted string variables * c_client: Fix crash in xcb_randr_set_monitor * configure.ac: drop `pthread-stubs` dependency on DragonFly and FreeBSD * xcb_conn: Add a check for NULL to silence a UBSan runtime error * configure.ac: Require xcb-proto >= 1.16.0 * Fix xcb_connect() call with a custom xcb_auth_info_t * autogen: add default patch prefix * Build DOUBLE-BUFFER extension. * Require xcb-proto >= 1.15.1, which has Dbe * configure.ac: drop dependency `pthread-stubs` on macOS * autogen.sh: use exec instead of waiting for configure to finish * Improve tutorial example - adjusted bug-262309_xcb-xauthlocalhostname.diff, n_If-auth-with-credentials-for-hostname-fails-retry-with-XAUTHLOCALHOSTNAME.patch - added libxcb-dbe0 subpackage for libxcb-dbe.so.0* OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/libxcb?expand=0&rev=67
35 lines
1.3 KiB
Diff
35 lines
1.3 KiB
Diff
Index: src/xcb_auth.c
|
|
===================================================================
|
|
--- src/xcb_auth.c.orig
|
|
+++ src/xcb_auth.c
|
|
@@ -118,6 +118,7 @@ static Xauth *get_authptr(struct sockadd
|
|
char hostnamebuf[256]; /* big enough for max hostname */
|
|
char dispbuf[40]; /* big enough to hold more than 2^64 base 10 */
|
|
int dispbuflen;
|
|
+ Xauth *authptr = NULL;
|
|
|
|
family = FamilyLocal; /* 256 */
|
|
switch(sockname->sa_family)
|
|
@@ -162,10 +163,20 @@ static Xauth *get_authptr(struct sockadd
|
|
addrlen = strlen(addr);
|
|
}
|
|
|
|
- return XauGetBestAuthByAddr (family,
|
|
+ authptr = XauGetBestAuthByAddr (family,
|
|
(unsigned short) addrlen, addr,
|
|
(unsigned short) dispbuflen, dispbuf,
|
|
N_AUTH_PROTOS, (char **)authnames, authnameslen);
|
|
+ // && !phostname
|
|
+ if ((!authptr || !authptr->data_length) && family == FamilyLocal) {
|
|
+ if ( (addr = getenv("XAUTHLOCALHOSTNAME")) ) {
|
|
+ authptr = XauGetBestAuthByAddr (family,
|
|
+ (unsigned short) strlen(addr), addr,
|
|
+ (unsigned short) dispbuflen, dispbuf,
|
|
+ N_AUTH_PROTOS, authnames, authnameslen);
|
|
+ }
|
|
+ }
|
|
+ return authptr;
|
|
}
|
|
|
|
#ifdef HASXDMAUTH
|