]> andersk Git - gssapi-openssh.git/blobdiff - setup/setup-openssh.pl
o Update version number of the package to 1.1.
[gssapi-openssh.git] / setup / setup-openssh.pl
index 9ef155b60ca8ee3538cad3e6ef32a01d58bd16c9..8ffc2d05d89e96557af052f7f957ebe40f066d6e 100644 (file)
@@ -105,6 +105,12 @@ GetOptions(
             'verbose' => \$verbose,
           ) or pod2usage(2);
 
+#
+# miscellaneous initialization functions
+#
+
+setPrivilegeSeparation(0);
+
 #
 # main execution.  This should find its way into a subroutine at some future
 # point.
@@ -841,7 +847,7 @@ sub copySSHDConfigFile
     # set the sftp directive
     #
 
-    $text = "Subsystem\tsftp\t$gpath/libxec/sftp-server";
+    $text = "Subsystem\tsftp\t$gpath/libexec/sftp-server";
     $data =~ s:^[\s|#]*Subsystem\s+sftp\s+.*$:$text:gm;
 
     #
@@ -991,6 +997,7 @@ sub copyFile
 sub copySXXScript
 {
     my($in, $out) = @_;
+    my($tmpgpath);
 
     if ( !isReadable($in) )
     {
@@ -1003,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.036995 seconds and 4 git commands to generate.