]> source.dussan.org Git - tigervnc.git/commitdiff
Check that xauth is in PATH
authorPierre Ossman <ossman@cendio.se>
Tue, 29 Dec 2015 13:24:55 +0000 (14:24 +0100)
committerBrian P. Hinz <bphinz@users.sf.net>
Mon, 4 Jan 2016 02:58:29 +0000 (21:58 -0500)
The rest of the code assumes xauth is in PATH, so let's check for
that instead.

unix/vncserver

index c4d0535994e3f86ca1331f13b55d3ef84a4062a3..a4d6ad939da68cb37cc40ac23d7d28fa5038826d 100755 (executable)
@@ -38,8 +38,6 @@ if($slashndx>=0) {
 
 $vncClasses = "";
 
-$xauth = "xauth";
-
 &SanityCheck();
 
 #
@@ -793,7 +791,7 @@ sub SanityCheck
     #
 
  cmd:
-    foreach $cmd ("uname") {
+    foreach $cmd ("uname","xauth") {
        for (split(/:/,$ENV{PATH})) {
            if (-x "$_/$cmd") {
                next cmd;
@@ -801,20 +799,6 @@ sub SanityCheck
        }
        die "$prog: couldn't find \"$cmd\" on your PATH.\n";
     }
-    if (-x "/usr/X11R6/bin/xauth") {
-       $xauth = "/usr/X11R6/bin/xauth";
-    }
-    else {
-      cmd1:
-       foreach $cmd ("xauth") {
-           for (split(/:/,$ENV{PATH})) {
-               if (-x "$_/$cmd") {
-                   next cmd1;
-               }
-           }
-           die "$prog: couldn't find \"$cmd\" on your PATH.\n";
-       }
-    }
 
     if($exedir eq "") {
       cmd2: