]> andersk Git - gssapi-openssh.git/blobdiff - setup/setup-openssh.pl
o Set the LD_LIBRARY_PATH variable before we start running any programs.
[gssapi-openssh.git] / setup / setup-openssh.pl
index cfb28b09e2b52521c6991098d9695e4b574c6833..4e65d179cd84e99c13f1713a81684d0c3e4c01d3 100644 (file)
@@ -29,6 +29,18 @@ if (!defined($gpath))
     die "GLOBUS_LOCATION needs to be set before running this script"
 }
 
+#
+# modify the ld library path for when we call ssh executables
+#
+
+$oldldpath = $ENV{LD_LIBRARY_PATH};
+$newldpath = "$gpath/lib";
+if (length($oldldpath) > 0)
+{
+    $newldpath .= ":$oldldpath";
+}
+$ENV{LD_LIBRARY_PATH} = "$newldpath";
+
 #
 # i'm including this because other perl scripts in the gpt setup directories
 # do so
@@ -64,18 +76,6 @@ my $keyfiles = {
                  "rsa1" => "ssh_host_key",
                };
 
-#
-# Check that we are running as root
-#
-
-$uid = $>;
-
-if ($uid != 0)
-{
-    print "--> NOTE: You must be root to run this script! <--\n";
-    exit 0;
-}
-
 sub copyKeyFiles
 {
     my($copylist) = @_;
@@ -427,7 +427,7 @@ sub action
 
     printf "$command\n";
 
-    my $result = system("$command 2>&1");
+    my $result = system("LD_LIBRARY_PATH=\"$gpath/lib:\$LD_LIBRARY_PATH\"; $command 2>&1");
 
     if (($result or $?) and $command !~ m!patch!)
     {
This page took 0.040211 seconds and 4 git commands to generate.