From a7ac6a9534b1e7af98c4647cc9915e5d1b02d0c4 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Tue, 29 Dec 2015 14:24:55 +0100 Subject: [PATCH] Check that xauth is in PATH The rest of the code assumes xauth is in PATH, so let's check for that instead. --- unix/vncserver | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/unix/vncserver b/unix/vncserver index c4d05359..a4d6ad93 100755 --- a/unix/vncserver +++ b/unix/vncserver @@ -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: -- 2.39.5