#
sub ftp_syslog {
- my ($priority,$message) = @_;
+ my $priority = shift;
+ my $message = shift;
# Remove a trailing newline
$message =~ s/[\r\n]+$//;
# Return array of public key files for PACKAGE_NAME.
#
sub keyring_file {
- my ($package_name,$directory) = (shift,shift);
+ my $package_name = shift;
+ my $directory = shift;
+
my @directory = split(/\//,$directory);
my @pubrings = ();
}
sub email_addresses {
- my ($package_name) = @_;
+ my $package_name = shift;
my @ret;
open (EMAIL_FILE, "<", "$package_config_base/$package_name/email")
# Used for both success and failure.
#
sub mail {
- my ($msg) = shift;
- my ($send_to_user) = shift;
- my ($subject) = shift;
+ my $msg = shift;
+ my $send_to_user = shift;
+ my $subject = shift;
$subject ||= '';
my @email_list = ($email_always);
# The bad . files will eventually get cleaned up via a separate script.
#
sub fatal {
- my ($tainted_msg) = shift;
- my ($send_to_user) = shift;
+ my $tainted_msg = shift;
+ my $send_to_user = shift;
# If we fail before we have sent a copy of the directive file contents to the maintainer
# (when running in DEBUG mode), that copy is passed along, and we can send it from here.
- my ($directive_file_contents) = shift;
+ my $directive_file_contents = shift;
my $exit_code = shift;
$directive_file_contents ||= '';
# sub-most directory, until we find one that matches (or not!)
#
sub verify_keyring {
- my ($directive_file, $directive_file_contents, @keyrings) = @_;
+ my $directive_file = shift;
+ my $directive_file_contents = shift;
+ my @keyrings = @_;
my $directive_file_size = -s $directive_file;
ftp_syslog('debug', "($log_style) DEBUG: $directive_file size is $directive_file_size") if DEBUG;
# other things, this lets us use gpgv everywhere, for paranoia's sake.
#
sub read_directive_file {
- my ($directive_file) = shift;
- my ($uploaded_file) = shift;
- my ($directive_only) = shift;
+ my $directive_file = shift;
+ my $uploaded_file = shift;
+ my $directive_only = shift;
# We default to v1.1
$info{'v1_compat_mode'} = 0;
}
sub automake_tests {
- my ($upload_file,$log_style,$debug) = @_;
+ my $upload_file = shift;
+ my $log_style = shift;
+ my $debug = shift;
my $error_string = '';
my @debug_log;
}
sub check_vulnerabilities {
- my ($upload_file,$log_style,$debug) = @_;
+ my $upload_file = shift;
+ my $log_style = shift;
+ my $debug = shift;
my ($error_string, $error_log_ref) = automake_tests($upload_file,$log_style,$debug);
#
sub archive {
- my ($dir, $subdir, $file) = @_;
+ my $dir = shift;
+ my $subdir = shift;
+ my $file = shift;
# Abort if file to archive doesn't exist
fatal("$subdir/$file does not exist - can not archive",1) if (!-e "$destfinal/$subdir/$file");
# Report success and unlink the directive file.
#
sub success_upload {
- my ($sig_file,$upload_file,$directive_file) = @_;
+ my $sig_file = shift;
+ my $upload_file = shift;
+ my $directive_file = shift;
mail ("upload of $upload_file and $sig_file complete",1);
}
sub success_directive {
- my ($directive_file) = shift;
+ my $directive_file = shift;
mail ("processing of $directive_file complete",1);
unlink ($directive_file) || ftp_warn("unlink($directive_file) failed: $!");
}