Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
DISCONTINUED:openSUSE:11.1:Update
xorg-x11-libxcb-unstable-devel
bug-262309_xcb-xauthlocalhostname.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File bug-262309_xcb-xauthlocalhostname.diff of Package xorg-x11-libxcb-unstable-devel
diff --git a/src/xcb_auth.c b/src/xcb_auth.c index ffc0515..9bd9a35 100644 --- a/src/xcb_auth.c +++ b/src/xcb_auth.c @@ -89,6 +89,7 @@ static Xauth *get_authptr(struct sockadd char dispbuf[40]; /* big enough to hold more than 2^64 base 10 */ int authnamelens[N_AUTH_PROTOS]; int i; + Xauth *authptr = NULL; family = FamilyLocal; /* 256 */ switch(sockname->sa_family) @@ -128,10 +129,20 @@ static Xauth *get_authptr(struct sockadd for (i = 0; i < N_AUTH_PROTOS; i++) authnamelens[i] = strlen(authnames[i]); - return XauGetBestAuthByAddr (family, - (unsigned short) addrlen, addr, - (unsigned short) strlen(dispbuf), dispbuf, - N_AUTH_PROTOS, authnames, authnamelens); + authptr = XauGetBestAuthByAddr (family, + (unsigned short) addrlen, addr, + (unsigned short) strlen(dispbuf), dispbuf, + N_AUTH_PROTOS, authnames, authnamelens); + // && !phostname + if ((!authptr || !authptr->data_length) && family == FamilyLocal) { + if ( (addr = getenv("XAUTHLOCALHOSTNAME")) ) { + authptr = XauGetBestAuthByAddr (family, + (unsigned short) strlen(addr), addr, + (unsigned short) strlen(dispbuf), dispbuf, + N_AUTH_PROTOS, authnames, authnamelens); + } + } + return authptr; } #ifdef HASXDMAUTH
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor