aboutsummaryrefslogtreecommitdiff
path: root/debian/patches/052_nxcomp_macos10-nxauth-location.full+lite.patch
blob: 4960c9d9e8ca83ef164835bb04d78e06121c76e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
--- a/nxcomp/Auth.cpp
+++ b/nxcomp/Auth.cpp
@@ -217,22 +217,31 @@
 
   //
   // 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");