From d0d7412f22fc9cc49e7821991afe8cf7f426b7e1 Mon Sep 17 00:00:00 2001 From: Matt Sergeant Date: Tue, 8 Apr 2008 10:34:25 +0000 Subject: [PATCH] Fix auth and tls in light of globalised hooks git-svn-id: https://svn.perl.org/qpsmtpd/trunk@874 958fd67b-6ff1-0310-b445-bb7760255be9 --- lib/Qpsmtpd.pm | 2 ++ lib/Qpsmtpd/SMTP.pm | 2 +- plugins/tls | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/Qpsmtpd.pm b/lib/Qpsmtpd.pm index 9c63658..11261a0 100644 --- a/lib/Qpsmtpd.pm +++ b/lib/Qpsmtpd.pm @@ -29,6 +29,8 @@ sub TRACE_LEVEL { $TraceLevel }; # leave for plugin compatibility my $LOGGING_LOADED = 0; +sub hooks { $hooks; } + sub load_logging { # need to do this differently that other plugins so as to # not trigger logging activity diff --git a/lib/Qpsmtpd/SMTP.pm b/lib/Qpsmtpd/SMTP.pm index fa11616..1cb7445 100644 --- a/lib/Qpsmtpd/SMTP.pm +++ b/lib/Qpsmtpd/SMTP.pm @@ -219,7 +219,7 @@ sub ehlo_respond { : (); # Check for possible AUTH mechanisms -HOOK: foreach my $hook ( keys %{$self->{hooks}} ) { +HOOK: foreach my $hook ( keys %{$self->hooks} ) { if ( $hook =~ m/^auth-?(.+)?$/ ) { if ( defined $1 ) { $auth_mechanisms{uc($1)} = 1; diff --git a/plugins/tls b/plugins/tls index b5db018..03c1c7d 100644 --- a/plugins/tls +++ b/plugins/tls @@ -91,7 +91,7 @@ sub init { $self->ssl_context($ssl_ctx); # Check for possible AUTH mechanisms -HOOK: foreach my $hook ( keys %{$qp->{hooks}} ) { +HOOK: foreach my $hook ( keys %{$qp->hooks} ) { no strict 'refs'; if ( $hook =~ m/^auth-?(.+)?$/ ) { if ( defined $1 ) {