'verbose' => \$verbose,
) or pod2usage(2);
+#
+# miscellaneous initialization functions
+#
+
+setPrivilegeSeparation(0);
+
#
# main execution. This should find its way into a subroutine at some future
# point.
# 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;
#
sub copySXXScript
{
my($in, $out) = @_;
+ my($tmpgpath);
if ( !isReadable($in) )
{
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");
}