From: Jacob Bachmeyer Date: Thu, 17 Nov 2022 03:14:42 +0000 (-0600) Subject: Remove quasi-global %info hash X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=b894a222a1c156e4e7935a372b580fa32ae06f98;p=gatekeeper.git Remove quasi-global %info hash --- diff --git a/gatekeeper.pl b/gatekeeper.pl index fa71747..b074e71 100755 --- a/gatekeeper.pl +++ b/gatekeeper.pl @@ -370,8 +370,6 @@ if (IN_TEST_MODE) { # override the above for testing close $gpgv; } -my %info; # package being processed; a global so mail can use it - =head1 INTERNALS This section catches the internal documentation for internal functions @@ -1910,7 +1908,6 @@ The values in the returned structure are untainted. =cut -# As temporary scaffolding, also sets the %info quasi-global. sub interpret_directive { my $directive = shift; # presumed tainted @@ -1992,7 +1989,6 @@ sub interpret_directive { $header{directory} = $val; # ok. $header{package} = $dirs[0]; # top-level name, no subdir - $info{package} = $header{package}; } elsif ($tainted_cmd eq 'filename') { # We use the same filename restrictions as scan_incoming unless ($tainted_val =~ /^($RE_filename_here)$/) { @@ -2757,8 +2753,6 @@ foreach my $packet (@packets) { # each list element is an array reference $complete = 1; }; - @{$info{email}} = @email_addresses; - if ($complete) { local $Phase = 'RP'; our $Scratch_dir; @@ -2799,7 +2793,6 @@ foreach my $packet (@packets) { # each list element is an array reference # and may not even have a target directory. push @email_addresses, directory_email_addresses($E->directory) if $E->directory; - @{$info{email}} = @email_addresses; mail join("\n",$E->summary,'',$E->trace_msg), to => \@email_addresses, subject => $op_header->{package}; } elsif ($E->type_p('package_configuration')) { @@ -2824,9 +2817,6 @@ foreach my $packet (@packets) { # each list element is an array reference # clean up files if we abort while processing a triplet cleanup ($sig_file, $upload_file, $directive_file) } - - # clear out the current package that we just finished processing - undef %info; } if ((scalar @packets) == 0) {