lib/Qpsmtpd/Auth.pm first attempts to execute a hook for the specific
authentication mechanism requested by the SMTP client ("auth-$mechanism"),
and then falls back to looking for a generic "auth" hook if the more
specific hook returned DECLINED. However if the more specific hook is
non-existent, the generic hook is never being called, which breaks the
auth/authdeny and auth/authnull plugin examples.
Patch attached.
Thanks,
-mct
--
perl -e'$u="\4\5\6";sub H{8*($_[1]%79)+($_[0]%8)}sub G{vec$u,H(@_),1}sub S{vec
($n,H(@_),1)=$_[2]}$_=q^{P`clear`;for$iX){PG($iY)?"O":" "forX8);P"\n"}for$iX){
forX8){$c=scalar [EMAIL PROTECTED];S$iY,G(
$iY)?$c=~/[23]/?1:0:$c==3?1:0}}$u=$n;select$M,$C,$T,.2;redo}^;s/Z/],[\$i/g;s/Y
/,\$_/xg;s/X/(0..7/g;s/P/print+/g;eval' # Michael C. Toren <[EMAIL
PROTECTED]>
diff -ru qpsmtpd-cvs/lib/Qpsmtpd/Auth.pm qpsmtpd-prod/lib/Qpsmtpd/Auth.pm
--- qpsmtpd-cvs/lib/Qpsmtpd/Auth.pm Thu Sep 23 12:14:56 2004
+++ qpsmtpd-prod/lib/Qpsmtpd/Auth.pm Sun Jan 16 03:34:31 2005
@@ -309,7 +309,7 @@
$passHash, $ticket );
# try running the polymorphous hooks next
- if ( $rc == DECLINED ) {
+ if ( !$rc || $rc == DECLINED ) {
( $rc, $msg ) =
$session->run_hooks( "auth", $mechanism, $user, $passClear,
$passHash,
$ticket );