xtrans/p_xauth.diff
Stefan Dirsch 3d48b30190 - Update to 1.5.1
* gitlab CI: add xz-utils to container for "make distcheck"
  * gitlab CI: collect config.log to help diagnose failures
  * gitlab CI: add libc-dev to required packages in build container
  * LocalInitTransports: Fix -Wuseless-cast warning for getenv() call
  * SocketCreateListener: Fix -Wuseless-cast warning in bind() call
  * Clear numerous -Wsign-compare warnings from gcc 14.1
  * SocketINETConnect: return failure when malloc() fails
  * ParseAddress: return failure when strdup() fails
  * MakeAllCOTSServerListeners: Initialize temp_ciptrs
  * GetMyNetworkId: Avoid writing to NULL pointer if malloc() fails
  * GetPeerNetworkId: Avoid writing to NULL pointer if malloc() fails
  * GetPeerNetworkId: avoid calling strlen() on a NULL pointer
  * SocketOpen: avoid leak of out-of-range fd
  * is_numeric: Add TRANS_SERVER to required ifdefs
  * update .gitignore
  * TRANS(ParseAddress): Fix "assignment discards ‘const’ qualifier" warnings
  * TRANS(GetHostname): Fix "‘strncpy’ output truncated.." warning
  * Fix string length check

OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xtrans?expand=0&rev=32
2024-10-13 19:18:30 +00:00

19 lines
527 B
Diff

--- Xtranssock.c.orig 2009-10-16 23:25:57.000000000 +0200
+++ Xtranssock.c 2010-04-04 16:10:29.000000000 +0200
@@ -1790,12 +1790,15 @@
{
char hostnamebuf[256];
+ char* xauthlocalname = getenv("XAUTHLOCALHOSTNAME");
TRANS(GetHostname) (hostnamebuf, sizeof (hostnamebuf));
if (strcmp (hostnamebuf, host) == 0)
{
return (1);
+ } else if(xauthlocalname && strcmp (xauthlocalname, host) == 0) {
+ return (1);
} else {
#if defined(IPv6) && defined(AF_INET6)
struct addrinfo *localhostaddr;