libxcb/bug-262309_xcb-xauthlocalhostname.diff
Stefan Dirsch ea17a760df Accepting request 104202 from home:jengelh:branches:X11:XOrg
Replaces xorg-x11-libxcb.

I'd also suggest to use <useforbuild><disable/></useforbuild>
in the oldpaths (like xorg-x11-libxcb) until their removal.
That way you don't need the %dummy thing and going forth and
back with it.

OBS-URL: https://build.opensuse.org/request/show/104202
OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/libxcb?expand=0&rev=1
2012-02-13 10:06:06 +00:00

28 lines
1.1 KiB
Diff

--- 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
@@ -100,2 +100,3 @@ static Xauth *get_authptr(struct sockadd
int dispbuflen;
+ Xauth *authptr = NULL;
@@ -143,6 +143,16 @@ static Xauth *get_authptr(struct sockadd
- return XauGetBestAuthByAddr (family,
- (unsigned short) addrlen, addr,
- (unsigned short) dispbuflen, dispbuf,
- N_AUTH_PROTOS, authnames, authnameslen);
+ authptr = XauGetBestAuthByAddr (family,
+ (unsigned short) addrlen, addr,
+ (unsigned short) dispbuflen, dispbuf,
+ N_AUTH_PROTOS, 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;
}