]> andersk Git - gssapi-openssh.git/commitdiff
o Add better handling of the globus location variable before it gets
authorcphillip <cphillip>
Mon, 15 Jul 2002 21:05:00 +0000 (21:05 +0000)
committercphillip <cphillip>
Mon, 15 Jul 2002 21:05:00 +0000 (21:05 +0000)
      placed into the SXXsshd script.  AKA clean up the string to avoid
      any abnormalities.

setup/setup-openssh.pl

index 3555985f2da6723bb06267356eeef279cb6e641d..d6680a75e01d2bacf57c7c2ee5ff2f4ea4955218 100644 (file)
@@ -997,6 +997,7 @@ sub copyFile
 sub copySXXScript
 {
     my($in, $out) = @_;
+    my($tmpgpath);
 
     if ( !isReadable($in) )
     {
@@ -1009,8 +1010,20 @@ sub copySXXScript
         return;
     }
 
+    #
+    # clean up any junk in the globus path variable
+    #
+
+    $tmpgpath = $gpath;
+    $tmpgpath =~ s:/+:/:g;
+    $tmpgpath =~ s:([^/]+)/$:\1:g;
+
+    #
+    # read in the script, substitute globus location, then write it back out
+    #
+
     $data = readFile($in);
-    $data =~ s|\@GLOBUS_LOCATION\@|$gpath|g;
+    $data =~ s|\@GLOBUS_LOCATION\@|$tmpgpath|g;
     writeFile($out, $data);
     action("chmod 755 $out");
 }
This page took 0.079115 seconds and 5 git commands to generate.