use POSIX qw(strftime WIFSIGNALED WTERMSIG);
use Email::MessageID;
+=head1 INTERNALS
+
+This section catches the internal documentation for internal functions
+within the gatekeeper program. This is for programmers maintaining the
+gatekeeper itself and these functions may change without notice.
+
+=over
+
+=cut
+
\f
#
# - Initialization and preliminaries
close $gpgv;
}
-=head1 INTERNALS
+\f
-This section catches the internal documentation for internal functions
-within the gatekeeper program. This is for programmers maintaining the
-gatekeeper itself and these functions may change without notice.
+=back
+
+=head2 Logging
=over
=cut
-\f
-#
-# - Logging
-#
-
{
# To identify which zone is being processed, ftp_syslog will prepend
# this, inside parentheses, to all messages logged.
}
\f
-#
-# - Local exception definitions and utilities
-#
+
+=back
+
+=head2 Local exception definitions and utilities
+
+=over
+
+=cut
{
package Local::Exception;
}
\f
-#
-# - GPG helpers
-#
+
+=back
+
+=head2 GPG helpers
+
+=over
=item $text = slurp_clearsigned_message ( $filename )
}
\f
-#
-# - Package configuration access
-#
+
+=back
+
+=head2 Package configuration access
+
+=over
=item $package_name = directory_package_name ( $directory )
}
\f
-#
-# - Email
-#
+
+=back
+
+=head2 Email
+
+=over
=item @unique_list = unique ( @list )
}
\f
-#
-# - Directive reader and parsing helpers
-#
+
+=back
+
+=head2 Directive reader and parsing helpers
+
+=over
=item $directive = read_directive ( $handle )
}
\f
-#
-# - [SC] Scan for incoming packets
-#
-# Read the ftp incoming dir (which is assumed to be the current
-# directory), looking for completed upload triples (the three files
-# described at the beginning). Ignore if we don't have all three files,
-# or if any of the files are still open, or if the filenames are dubious
-# -- things'll get cleaned up as needed separately.
-#
-# If we accept a triplet, we rename the files into a temporary
-# directory. This is to avoid attackers overwriting files as or after
-# we check them. This is redundant protection -- the ftp config on
-# ftp.gnu.org does not allow overwrites or deletes.
-#
+=back
+
+=head2 [SC] Scan for incoming packets
+
+=over
=item @files = scan_incoming ( $directory )
}
\f
-#
-# - [PV] Parsing and Validation
-#
-# Return the information for this upload out of DIRECTIVE_FILE --
-# directory and package. Make sure the key that signed the directive
-# file has permission to write to this package, too.
-#
-# We assume DIRECTIVE_FILE is clear-signed (gpg --clearsign). Among
-# other things, this lets us use gpgv everywhere, for paranoia's sake.
-#
+=back
+
+=head2 [PV] Parsing and Validation
+
+=over
=item $oplist = interpret_directive ( $directive )
}
\f
-#
-# - [EX] Execution
-#
+
+=back
+
+=head2 [EX] Execution
+
+=over
=item mkdir_p ( $base, @directory )
}
\f
-#
-# - Clean up
-#
+
+=back
+
+=head2 Clean up
+
+=over
=item cleanup_dir ( $directory )
}
}
+\f
+
=back
-=cut
+=head2 Main execution path
-\f
-#
-# - Main execution path
-#
+=cut
our $Phase;
my @packets;