aboutsummaryrefslogtreecommitdiff
path: root/nxcomp/Auth.cpp
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2013-03-28 08:55:23 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2013-03-28 08:55:23 +0100
commite77bf36d9afbc7e56522574b06217d57c11dd095 (patch)
tree123ed036d60c80c816474f516bc0198be58d8410 /nxcomp/Auth.cpp
parentd16188f08b659a6dc2a150d84c5ed5d7bf5cf02b (diff)
downloadnx-libs-e77bf36d9afbc7e56522574b06217d57c11dd095.tar.gz
nx-libs-e77bf36d9afbc7e56522574b06217d57c11dd095.tar.bz2
nx-libs-e77bf36d9afbc7e56522574b06217d57c11dd095.zip
release 3.5.0.19
Diffstat (limited to 'nxcomp/Auth.cpp')
-rw-r--r--nxcomp/Auth.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/nxcomp/Auth.cpp b/nxcomp/Auth.cpp
index d8e999132..c52392a51 100644
--- a/nxcomp/Auth.cpp
+++ b/nxcomp/Auth.cpp
@@ -217,22 +217,31 @@ int Auth::getCookie()
//
// Use the nxauth command on Windows and the Mac, xauth
- // on all the other platforms. On Windows and on the Mac
- // we assume that the nxauth command is located under
- // bin in the client installation directory. On all the
+ // on all the other platforms. On Windows we assume that
+ // the nxauth command is located under bin in the client
+ // installation directory. On Mac OS X we assume that the
+ // command is located directly in the client installation
+ // directory, to make bundle shipping easier. On all the
// other platforms we use the default xauth command that
// is in our path.
//
char command[DEFAULT_STRING_LIMIT];
- #if defined(__CYGWIN32__) || defined(__APPLE__)
+ #if defined(__CYGWIN32__)
snprintf(command, DEFAULT_STRING_LIMIT - 1,
"%s/bin/nxauth", control -> SystemPath);
*(command + DEFAULT_STRING_LIMIT - 1) = '\0';
+ #elif defined(__APPLE__)
+
+ snprintf(command, DEFAULT_STRING_LIMIT - 1,
+ "%s/nxauth", control -> SystemPath);
+
+ *(command + DEFAULT_STRING_LIMIT - 1) = '\0';
+
#else
strcpy(command, "xauth");