From 76b9f2d9104af9ee21a71ae7351deb89558390b6 Mon Sep 17 00:00:00 2001 From: Reinhard Tartler Date: Mon, 10 Oct 2011 17:51:57 +0200 Subject: Imported nxauth-3.2.0-1.tar.gz Summary: Imported nxauth-3.2.0-1.tar.gz Keywords: Imported nxauth-3.2.0-1.tar.gz into Git repository --- nx-X11/programs/nxauth/CHANGELOG | 8 ++++++++ nx-X11/programs/nxauth/process.c | 14 ++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/nx-X11/programs/nxauth/CHANGELOG b/nx-X11/programs/nxauth/CHANGELOG index c2eb70c4f..3cc7dbb6e 100644 --- a/nx-X11/programs/nxauth/CHANGELOG +++ b/nx-X11/programs/nxauth/CHANGELOG @@ -1,5 +1,13 @@ ChangeLog: +nxauth-3.2.0-1 + +- Opened the 3.2.0 branch based on nxauth-3.1.0-2. + +nxauth-3.1.0-2 + +- Added support for launchd socket. + nxauth-3.1.0-1 - Opened the 3.1.0 branch based on nxauth-3.0.0-6. diff --git a/nx-X11/programs/nxauth/process.c b/nx-X11/programs/nxauth/process.c index bbf59eb7a..d65638697 100644 --- a/nx-X11/programs/nxauth/process.c +++ b/nx-X11/programs/nxauth/process.c @@ -503,6 +503,20 @@ get_displayname_auth(char *displayname, Xauth *auth) if (cp && strncmp (cp, "/unix:", 6) == 0) prelen = (cp - displayname); + #ifdef __APPLE__ + + /* + * FIXME: This is an attempt to get the right + * cookie, because no one can grant that the + * X server is running on the display number + * reported in the launchd display name. + */ + + if (strncmp (displayname, "/tmp/launch", 11) == 0) + displayname = strrchr(displayname, '/') + 1; + + #endif + if (!parse_displayname (displayname + ((prelen > 0) ? prelen + 1 : 0), &family, &host, &dpynum, &scrnum, &rest)) { return False; -- cgit v1.2.3