exit;
}
-&version_information () if ($version);
-&usage_information() if ($help);
-&usage_information() if (($style ne 'ftp') && ($style ne 'alpha') && ($style ne 'distros'));
+version_information() if ($version);
+usage_information() if ($help);
+usage_information() if (($style ne 'ftp') && ($style ne 'alpha') && ($style ne 'distros'));
my $m_style = 'ftp';
$m_style = 'alpha' if ($style eq 'alpha');
my @ret;
open (EMAIL_FILE, "<", "$package_config_base/$package_name/email")
- || &fatal("The directory line should start with the name of the package for which you are trying to upload a file, e.g. gcc, gawk, or gasm. We have no package named '$package_name'. If this is a new GNU package, please ensure that you have registered your GPG key for its uploads, per http://www.gnu.org/prep/maintain/html_node/Automated-Upload-Registration.html. The GPG key must be registered separately for each package, so this needs to be done even if you are already registered for uploading with another package.",1);
+ || fatal("The directory line should start with the name of the package for which you are trying to upload a file, e.g. gcc, gawk, or gasm. We have no package named '$package_name'. If this is a new GNU package, please ensure that you have registered your GPG key for its uploads, per http://www.gnu.org/prep/maintain/html_node/Automated-Upload-Registration.html. The GPG key must be registered separately for each package, so this needs to be done even if you are already registered for uploading with another package.",1);
while (<EMAIL_FILE>) {
chomp;
$directive_file_contents ||= '';
if (($directive_file_contents ne '') && DEBUG) {
- &mail ($directive_file_contents,0,"debug: directive file contents");
+ mail ($directive_file_contents,0,"debug: directive file contents");
}
ftp_syslog('err', "($log_style) $tainted_msg");
$tainted_msg =~ m=^([-.:,/@\w\s]+)$=;
my $msg = $1;
- &mail ($msg,$send_to_user);
+ mail ($msg,$send_to_user);
my $pid = open(PWD, "-|");
my $cwd;
#
for my $f (($directive, $sig, $base)) {
rename ($f, "$incoming_tmp/$f")
- || &fatal("rename $incoming_dir/$f to $incoming_tmp/$f failed: $!",0);
+ || fatal("rename $incoming_dir/$f to $incoming_tmp/$f failed: $!",0);
}
# don't bother to try any part of this triple again.
# Do atomic rename to temp incoming directory before reading
# anything, for safety.
rename ($base, "$incoming_tmp/$base")
- || &fatal("rename $incoming_dir/$base to $incoming_tmp/$base failed: $!",0);
+ || fatal("rename $incoming_dir/$base to $incoming_tmp/$base failed: $!",0);
}
delete $possible{$base};
} elsif ((-f $directive) && ((-s $directive) >= 50*1024)) {
rename ("$incoming_dir/$directive", "$incoming_dir/.$directive");
ftp_syslog('info', "($log_style) directive file ($directive) larger than 50KB");
- &fatal("The directive file $directive is larger than 50KB. This can not be correct, ignoring upload.",0);
+ fatal("The directive file $directive is larger than 50KB. This can not be correct, ignoring upload.",0);
} elsif ((-f $sig) && ((-s $sig) >= 50*1024)) {
rename ("$incoming_dir/$sig", "$incoming_dir/.$sig");
ftp_syslog('info', "($log_style) signature file ($sig) larger than 50KB");
- &fatal("The signature file $sig is larger than 50KB. This can not be correct, ignoring upload.",0);
+ fatal("The signature file $sig is larger than 50KB. This can not be correct, ignoring upload.",0);
}
}
$tainted_val =~ s/^\s+//; # Or even *before* their commands
# $do_not_fail is set to 1 if this sub is called as a last resort in an attempt to find *someone* to report an error to.
- # When it is set, this sub will not die with &fatal.
+ # When it is set, this sub will not die with fatal.
my $do_not_fail = shift;
# Can't let it start with - . / or contain strange characters.
# This disallows .. as a file name component since no component
# can start with a . at all.
- $tainted_val =~ m,^(\w[-.\w]*(/\w[-.\w]*)*)$, || &fatal("invalid directory $tainted_val\n$directive_file_contents",1,$directive_file_contents);
+ $tainted_val =~ m,^(\w[-.\w]*(/\w[-.\w]*)*)$, || fatal("invalid directory $tainted_val\n$directive_file_contents",1,$directive_file_contents);
my $val = $1; # so far so good
# A couple of subdir levels are ok, but don't allow hundreds.
my $slash_count = ($val =~ tr,/,/,);
- &fatal("$slash_count slashes is too many, in $val",1,$directive_file_contents) if ($slash_count > 3 and not $do_not_fail);
+ fatal("$slash_count slashes is too many, in $val",1,$directive_file_contents) if ($slash_count > 3 and not $do_not_fail);
# Only let them specify one directory directive.
- &fatal("Only one directory directive is allowed per directive file. Error at directory directive: $val",1,$directive_file_contents)
+ fatal("Only one directory directive is allowed per directive file. Error at directory directive: $val",1,$directive_file_contents)
if (exists $info{"directory"} and not $do_not_fail);
if (DEBUG > 0);
my $retval = '';
open (GPGV, "$verify_str|")
- or &fatal("failed to run command: $verify_str",1);
+ or fatal("failed to run command: $verify_str",1);
while (defined (my $line = <GPGV>)) {
$retval .= $line;
}
if (!defined($retval)) {
# This is bad - we couldn't even execute the gpgv command properly
guess_uploader_email($directive_file_contents);
- &fatal("gpg verify of directive file failed (error executing gpgv): $!",0,'',2);
+ fatal("gpg verify of directive file failed (error executing gpgv): $!",0,'',2);
} elsif ($retval =~ /\n0\n$/s) { # We store the return value of gpgv on the last line of the output
ftp_syslog('info', "($log_style) verified against $_\n");
return $retval; # We got return value 0 from gpgv -> key verified!
}
}
guess_uploader_email($directive_file_contents);
- &fatal("gpg verify of directive file failed",1,'',2);
+ fatal("gpg verify of directive file failed",1,'',2);
}
\f
}
close(TMP);
- my $tmp_retval = &verify_keyring($directive_file,$directive_file_contents,@tmp_keyrings);
+ my $tmp_retval = verify_keyring($directive_file,$directive_file_contents,@tmp_keyrings);
push(@{$info{email}},$1) if ($tmp_retval =~ /Good signature from .*?<(.*?)>/);
my $signed = 0;
parse_directory_line($tainted_val, $directive_file_contents,0);
} elsif ($tainted_cmd =~ /^Filename:?$/i) { # case-insensitive, w or w/o the :
# We use the same filename restrictions as scan_incoming
- $tainted_val =~ /^([\w_+][-.\w_+~]*)$/ || &fatal("invalid filename $tainted_val",1,$directive_file_contents);
+ $tainted_val =~ /^([\w_+][-.\w_+~]*)$/ || fatal("invalid filename $tainted_val",1,$directive_file_contents);
my $val = $1; # so far so good
# Only let them specify one filename directive.
- &fatal("Only one filename directive is allowed per directive file. Error at filename directive: $val.",1,$directive_file_contents)
+ fatal("Only one filename directive is allowed per directive file. Error at filename directive: $val.",1,$directive_file_contents)
if exists $info{"filename"};
$info{"filename"} = {"value" => $val, "order" => $cnt++}; # ok.
} elsif ($tainted_cmd =~ /^Version:?$/i) { # case-insensitive, w or w/o the :
- $tainted_val =~ /^(\d+\.\d+)$/ || &fatal("invalid version $tainted_val",1,$directive_file_contents);
+ $tainted_val =~ /^(\d+\.\d+)$/ || fatal("invalid version $tainted_val",1,$directive_file_contents);
my $val = $1; # so far so good
# We only support version 1.1/1.2 right now!
- &fatal("invalid version $val, not supported",1,$directive_file_contents) if (($val ne '1.1') and ($val ne '1.2'));
+ fatal("invalid version $val, not supported",1,$directive_file_contents) if (($val ne '1.1') and ($val ne '1.2'));
# Only let them specify one version directive.
- &fatal("invalid second version $val, have $info{version}",1,$directive_file_contents) if exists $info{"version"};
+ fatal("invalid second version $val, have $info{version}",1,$directive_file_contents) if exists $info{"version"};
$info{"version"} = $val; #ok.
} elsif ($tainted_cmd =~ /^symlink:?$/i) { # case-insensitive, w or w/o the :
- $tainted_val =~ /^([\w_+][-.\w_+\/]*)\s+([\w_+][-.\w_+\/]*)$/ || &fatal("invalid parameters for symlink command: $tainted_val",1,$directive_file_contents);
+ $tainted_val =~ /^([\w_+][-.\w_+\/]*)\s+([\w_+][-.\w_+\/]*)$/ || fatal("invalid parameters for symlink command: $tainted_val",1,$directive_file_contents);
my ($target,$link) = ($1,$2); # so far so good
- &fatal("invalid parameters for symlink command(2): $tainted_val",1,$directive_file_contents) if ($target =~ /\.\./ || $link =~ /\.\./);
+ fatal("invalid parameters for symlink command(2): $tainted_val",1,$directive_file_contents) if ($target =~ /\.\./ || $link =~ /\.\./);
$info{"symlink-$target"} = {"link" => $link, "order" => $cnt++}; #ok.
} elsif ($tainted_cmd =~ /^rmsymlink:?$/i) { # case-insensitive, w or w/o the :
- $tainted_val =~ /^([\w_+][-.\w_+\/]*)$/ || &fatal("invalid parameters for rmsymlink command: $tainted_val",1,$directive_file_contents);
+ $tainted_val =~ /^([\w_+][-.\w_+\/]*)$/ || fatal("invalid parameters for rmsymlink command: $tainted_val",1,$directive_file_contents);
my $val = $1; # so far so good
- &fatal("invalid parameters for rmsymlink command(2): $tainted_val",1,$directive_file_contents) if ($val =~ /\.\./);
+ fatal("invalid parameters for rmsymlink command(2): $tainted_val",1,$directive_file_contents) if ($val =~ /\.\./);
$info{"rmsymlink-$1"} = {"order" => $cnt++}; #ok.
} elsif ($tainted_cmd =~ /^archive:?$/i) { # case-insensitive, w or w/o the :
- $tainted_val =~ /^([\w_+][-.\w_+\/]*)$/ || &fatal("invalid parameters for archive command: $tainted_val",1,$directive_file_contents);
+ $tainted_val =~ /^([\w_+][-.\w_+\/]*)$/ || fatal("invalid parameters for archive command: $tainted_val",1,$directive_file_contents);
my $val = $1; # so far so good
- &fatal("invalid parameters for archive command(2): $tainted_val",1,$directive_file_contents) if ($val =~ /\.\./);
+ fatal("invalid parameters for archive command(2): $tainted_val",1,$directive_file_contents) if ($val =~ /\.\./);
$info{"archive-$1"} = {"order" => $cnt++}; #ok.
} elsif ($tainted_cmd =~ /^replace:?$/i) { # case-insensitive, w or w/o the :
# This command is only supported from v1.2
- $tainted_val =~ /^(true|false)$/ || &fatal("invalid parameters for replace command: $tainted_val",1,$directive_file_contents);
+ $tainted_val =~ /^(true|false)$/ || fatal("invalid parameters for replace command: $tainted_val",1,$directive_file_contents);
$info{"replace"} = $1; #ok.
} elsif ($tainted_cmd =~ /^comment:?$/i) { # case-insensitive, w or w/o the :
# Comments are ok, we ignore them
# The testsuite uses a no-op command to validate directive processing.
$info{'no-op'} = {order => $cnt++};
} else {
- &fatal("Invalid directive line:\n\n $tainted_cmd $tainted_val",1,$directive_file_contents);
+ fatal("Invalid directive line:\n\n $tainted_cmd $tainted_val",1,$directive_file_contents);
}
}
$info{'v1_compat_mode'} = 0;
if (exists($info{"replace"}) and (($info{'v1_compat_mode'} == 1) or ($info{"version"} eq '1.1'))) {
- &fatal("invalid directive 'replace', not supported prior to version 1.2",1,$directive_file_contents);
+ fatal("invalid directive 'replace', not supported prior to version 1.2",1,$directive_file_contents);
}
# Phone home. E-mail the contents of the directive file to the maintainer,
# for debugging purposes. After this point, we don't need to pass the
- # $directive_file_contents to any subsequent &fatal calls.
+ # $directive_file_contents to any subsequent fatal calls.
if (defined $info{'package'}) {
debug($directive_file_contents, $info{'package'}) if DEBUG;
} else {
# Send the warning to the upload-ftp script maintainer, and the person who
# signed the file, if we were able to extract that from the signature on
# the directive file.
- &fatal("no directory directive specified in $directive_file",1);
+ fatal("no directory directive specified in $directive_file",1);
}
# There are a few possibilities regarding the 'filename' directive
# That means: three files, and ONLY a directory directive in the directive file
$info{'v1_compat_mode'} = 1;
if ($directory_command_only == 0) {
- &fatal("no filename directive specified in $directive_file",1)
+ fatal("no filename directive specified in $directive_file",1)
} else {
ftp_syslog('info',"($log_style) running in legacy v1 compatibility mode");
}
} elsif (!$V1_COMPAT_ALLOWED) {
# This is not allowed - we require a filename directive. No backwards compatibility.
- &fatal("no filename directive specified in $directive_file. Upgrade to the latest version! See http://www.gnu.org/prep/maintain/maintain.html",1)
+ fatal("no filename directive specified in $directive_file. Upgrade to the latest version! See http://www.gnu.org/prep/maintain/maintain.html",1)
}
} else {
# We only have a directive file
# Do we have something to do?
- &fatal("nothing to do - no commands in directive file",1) if ($directory_command_only == 1);
+ fatal("nothing to do - no commands in directive file",1) if ($directory_command_only == 1);
}
$filename_required = 0;
}
# Configuration must exist for the package
-d $package_config_base . '/' . $info{"package"}
- || &fatal("no configuration directory for package $info{package}",0);
+ || fatal("no configuration directory for package $info{package}",0);
# Check that we have a keyring for this package:
- my @keyrings = &keyring_file ($info{package},$info{directory});
- &fatal("no keyring for package $info{package}",0) if ($#keyrings < 0);
+ my @keyrings = keyring_file ($info{package},$info{directory});
+ fatal("no keyring for package $info{package}",0) if ($#keyrings < 0);
if ($filename_required) {
# Ben Pfaff <blp@cs.stanford.edu> wrote:
# that needs to match the name of the uploaded file.
# Filename has to match the name of the uploaded file
- &fatal("The filename directive does not match name of the uploaded file.\n\n Filename directive: $info{filename}{value}\n Uploaded file: $uploaded_file\n",1)
+ fatal("The filename directive does not match name of the uploaded file.\n\n Filename directive: $info{filename}{value}\n Uploaded file: $uploaded_file\n",1)
if ($uploaded_file ne $info{filename}{value});
# Filename has to match the name of this directive file (a bit paranoid, but hey...)
- &fatal("filename $info{filename}{value} does not match name of directive file $directive_file",1)
+ fatal("filename $info{filename}{value} does not match name of directive file $directive_file",1)
if ($directive_file ne "$info{filename}{value}.directive.asc");
}
# They have to specify a version unless we're in 1.0 compatibility mode
if (!$info{'v1_compat_mode'}) {
- &fatal("no version directive specified in $directive_file",1)
+ fatal("no version directive specified in $directive_file",1)
if ! $info{"version"};
}
- my $retval = &verify_keyring($directive_file,$directive_file_contents,@keyrings);
+ my $retval = verify_keyring($directive_file,$directive_file_contents,@keyrings);
# Now check that the timestamp of signing for the directive is not older
# than the one for the last file that was uploaded
# Verify that this timestamp is not too far in the future. We allow a discrepancy of 1 day so we don't have to worry about timezones
my $now = time();
if ($epoch > ($now + 24*3600)) {
- &fatal("GPG signed upload from the future - not allowed. Please make sure your clock is set correctly, resign the directive file, and upload again. You may have to wait 24 hours before re-uploading if you do not change the filename for your triplet.",1);
+ fatal("GPG signed upload from the future - not allowed. Please make sure your clock is set correctly, resign the directive file, and upload again. You may have to wait 24 hours before re-uploading if you do not change the filename for your triplet.",1);
}
# Now we need to flock the our 'serials' file;
# Verify that this is really a new version of the file!
if (exists($serials{$full_filename}) && ($serials{$full_filename} >= $epoch)) {
flock(SERIALS,4); # Release lock
- &fatal("Gpg signed upload older than/same timestamp as existing version - not allowed. In other words, the filenames for the triplet you have uploaded are an exact match for a triplet that has been uploaded in the past, and the directive file that you just uploaded has been signed before or at the same time as the directive file for the triplet that was uploaded earlier. Most likely, you are re-uploading an old triplet.",1);
+ fatal("Gpg signed upload older than/same timestamp as existing version - not allowed. In other words, the filenames for the triplet you have uploaded are an exact match for a triplet that has been uploaded in the past, and the directive file that you just uploaded has been signed before or at the same time as the directive file for the triplet that was uploaded earlier. Most likely, you are re-uploading an old triplet.",1);
}
$serials{$full_filename} = $epoch;
flock(SERIALS,4); # Release lock
close(SERIALS);
} elsif ($filename_required) {
- &fatal("gpg verification problem: could not extract timestamp",1);
+ fatal("gpg verification problem: could not extract timestamp",1);
}
return 0;
sub check_vulnerabilities {
my ($upload_file,$log_style,$debug) = @_;
- my ($error_string, $error_log_ref) = &automake_tests($upload_file,$log_style,$debug);
+ my ($error_string, $error_log_ref) = automake_tests($upload_file,$log_style,$debug);
return ($error_string, $error_log_ref);
}
ftp_syslog('debug', "($log_style) DEBUG: $sig_file size is $sig_file_size") if DEBUG;
ftp_syslog('debug', "($log_style) DEBUG: $upload_file size is $upload_file_size") if DEBUG;
- my @keyrings = &keyring_file ($info{package},$info{directory});
- &fatal("no keyring for package $info{package}",0) if ($#keyrings < 0);
+ my @keyrings = keyring_file ($info{package},$info{directory});
+ fatal("no keyring for package $info{package}",0) if ($#keyrings < 0);
my $valid = 0;
foreach my $keyring (@keyrings) {
}
}
$valid
- or &fatal("gpg verify of upload file ($upload_file) failed",1);
+ or fatal("gpg verify of upload file ($upload_file) failed",1);
my ($error_string, $error_log_ref) = check_vulnerabilities($upload_file,$log_style,DEBUG);
}
}
- &fatal($error_string,1,'',3) if ($error_string ne '');
+ fatal($error_string,1,'',3) if ($error_string ne '');
ftp_syslog('debug', "($log_style) DEBUG: tested negative for CVE-2009-4029 and CVE-2012-3386") if DEBUG;
}
my ($dir, $subdir, $file) = @_;
# Abort if file to archive doesn't exist
- &fatal("$subdir/$file does not exist - can not archive",1) if (!-e "$destfinal/$subdir/$file");
+ fatal("$subdir/$file does not exist - can not archive",1) if (!-e "$destfinal/$subdir/$file");
my $timestamp = strftime "%Y-%m-%d_%H-%M-%S", localtime;
$timestamp .= sprintf("_%09d",rand(1000000000)); # Add a large random number for good measure
# Abort if a file with same name exists in the archive
- &fatal("$subdir/$file exists in archive - can not overwrite",1) if (-e "$olddestfinal/$subdir/$timestamp" . "_$file");
+ fatal("$subdir/$file exists in archive - can not overwrite",1) if (-e "$olddestfinal/$subdir/$timestamp" . "_$file");
my @mkdir_args = ("/bin/mkdir","-p","$olddestfinal/$subdir");
- &fatal("@mkdir_args failed",0) if system (@mkdir_args) != 0;
+ fatal("@mkdir_args failed",0) if system (@mkdir_args) != 0;
my @mv_args = ("/bin/mv", "$dir/$file", "$olddestfinal/$subdir/$timestamp" . "_$file");
- &fatal("@mv_args failed",0) if system (@mv_args) != 0;
+ fatal("@mv_args failed",0) if system (@mv_args) != 0;
ftp_syslog('info', "($log_style) archived $dir/$file to $olddestfinal/$subdir/$timestamp" . "_$file");
}
# change it if you like, let's move on ...
my @mkdir_args = ("/bin/mkdir", "-p", $destdir);
system (@mkdir_args);
- -d $destdir || &fatal("no directory $destdir",1);
+ -d $destdir || fatal("no directory $destdir",1);
my ($t1, $t2) = (0,0);
# We now allow overwriting of files - without warning!!
if (-e "$destdir/$sig_file") {
if (not exists($info{'replace'}) or ($info{'replace'} ne 'true')) {
- &fatal("This signature file exists: $destdir/$sig_file, if you want to replace the pair please use the 'replace' directive",1);
+ fatal("This signature file exists: $destdir/$sig_file, if you want to replace the pair please use the 'replace' directive",1);
} else {
archive($destdir, $info{directory}, $sig_file);
ftp_syslog('info', "($log_style) archived and overwrote $destdir/$sig_file with uploaded version");
}
if (-e "$destdir/$upload_file") {
if (not exists($info{'replace'}) or ($info{'replace'} ne 'true')) {
- &fatal("This file exists: $destdir/$upload_file, if you want to replace the pair please use the 'replace' directive",1);
+ fatal("This file exists: $destdir/$upload_file, if you want to replace the pair please use the 'replace' directive",1);
} else {
archive($destdir, $info{directory}, $upload_file);
ftp_syslog('info', "($log_style) overwrote $destdir/$upload_file with uploaded version");
my $notification_str = '';
$notification_str .= "Archived and overwrote $destdir/$sig_file with uploaded version\n" if ($t1);
$notification_str .= "Archived and overwrote $destdir/$upload_file with uploaded version\n" if ($t2);
- &mail ($notification_str) if ($notification_str ne '');
+ mail ($notification_str) if ($notification_str ne '');
# Do we need a subdirectory on $desttmp as well? Can't quite picture
# when we'd have a collision, so skip that for now.
#
for my $f (($sig_file, $upload_file)) {
my @mv_args = ("/bin/mv", $f, "$desttmp/$f");
- &fatal("@mv_args failed",0) if system (@mv_args) != 0;
+ fatal("@mv_args failed",0) if system (@mv_args) != 0;
}
# Do atomic rename (if the system crashes between or during the mv's,
for my $f (($sig_file, $upload_file)) {
chmod 0644, "$desttmp/$f";
rename ("$desttmp/$f", "$destdir/$f")
- || &fatal("rename($desttmp/$f, $destdir/$f) failed: $!",0);
+ || fatal("rename($desttmp/$f, $destdir/$f) failed: $!",0);
}
}
my $destdir = "$destfinal/$originfo{directory}";
foreach my $key (sort { $info{$a}{order} <=> $info{$b}{order} } keys %info) {
if ($key eq 'filename') {
- &check_files($files,%originfo);
- &install_files($files,%originfo);
+ check_files($files,%originfo);
+ install_files($files,%originfo);
} elsif ($key =~ /^symlink-(.*)/) {
my $target = $1;
# Get current working dir
my $cwd = getcwd;
# Make sure there are no double dots in the path, and that it is absolute.
# A bit paranoid, but hey...
- &fatal("invalid directory $cwd",1,'')
+ fatal("invalid directory $cwd",1,'')
if (($cwd =~ /\.\./) || (!($cwd =~ m,^/,)));
# Now untaint the getcwd output
$cwd =~ /^(.*)$/;
chdir($destdir);
# if the symlink already exists, remove it
if (-l $info{$key}{link}) {
- unlink($info{$key}{link}) || &fatal("removal of symlink $info{$key}{link} failed: $!",1);
+ unlink($info{$key}{link}) || fatal("removal of symlink $info{$key}{link} failed: $!",1);
}
# symlink away!
- symlink("$target",$info{$key}{link}) || &fatal("creation of symlink $info{$key}{link} to $target in $destdir failed: $!",1);
+ symlink("$target",$info{$key}{link}) || fatal("creation of symlink $info{$key}{link} to $target in $destdir failed: $!",1);
# go back to current working dir
ftp_syslog('info', "($log_style) added symlink $destdir/" . $info{$key}{link} . " pointing to $destdir/$target");
- chdir($cwd) || &fatal("chdir to $cwd failed: $!",1);
+ chdir($cwd) || fatal("chdir to $cwd failed: $!",1);
} elsif ($key =~ /^rmsymlink-(.*)/) {
- &fatal("refusing to remove a non-symlink file",1) unless -l "$destdir/$1";
- unlink("$destdir/$1") || &fatal("removal of symlink $1 failed: $!",1);
+ fatal("refusing to remove a non-symlink file",1) unless -l "$destdir/$1";
+ unlink("$destdir/$1") || fatal("removal of symlink $1 failed: $!",1);
ftp_syslog('info', "($log_style) removed symlink $destdir/$1");
} elsif ($key =~ /^archive-(.*)/) {
# We now also allow archiving entire directories
# We're running in v1 mode.
if ($originfo{'v1_compat_mode'}) {
- &check_files($files,%originfo);
- &install_files($files,%originfo);
+ check_files($files,%originfo);
+ install_files($files,%originfo);
}
}
sub success_upload {
my ($sig_file,$upload_file,$directive_file) = @_;
- &mail ("upload of $upload_file and $sig_file complete",1);
+ mail ("upload of $upload_file and $sig_file complete",1);
unlink ($directive_file) || ftp_warn("unlink($directive_file) failed: $!");
}
sub success_directive {
my ($directive_file) = shift;
- &mail ("processing of $directive_file complete",1);
+ mail ("processing of $directive_file complete",1);
unlink ($directive_file) || ftp_warn("unlink($directive_file) failed: $!");
}
# the chdir simplifies our filename parsing, so the base names don't
# have any directory.
chdir ($incoming_dir) || ftp_die("FATAL: chdir($incoming_dir) failed: $!");
-my @incoming = &scan_incoming ();
+my @incoming = scan_incoming ();
# we've moved the files to work on to a new directory.
# onto the next triplet.
eval {
# set up the %info variable
- my $retval = &read_directive_file ($files->{"directive"},$files->{"upload"},$files->{"directive_only"});
+ my $retval = read_directive_file ($files->{"directive"},$files->{"upload"},$files->{"directive_only"});
if ($retval == 0) {
# do the work
- &execute_commands($files,%info);
+ execute_commands($files,%info);
# report success
if (!$files->{"directive_only"}) {
- &success_upload($files->{"sig"}, $files->{"upload"},$files->{"directive"});
+ success_upload($files->{"sig"}, $files->{"upload"},$files->{"directive"});
} else {
- &success_directive($files->{directive});
+ success_directive($files->{directive});
}
}
};