[svn:qpsmtpd] rev 405 - in trunk: . plugins/auth

[email protected] 12 Apr 2005 20:48:53 -0000
Newsgroups perl.cvs.qpsmtpd
Message-ID <[email protected]>
Author: jpeacock
Date: Tue Apr 12 13:48:53 2005
New Revision: 405

Modified:
   trunk/   (props changed)
   trunk/plugins/auth/auth_ldap_bind
Log:
 *  plugins/auth/auth_ldap_bind
    Correct DECLINE to DECLINED


Modified: trunk/plugins/auth/auth_ldap_bind
==============================================================================
--- trunk/plugins/auth/auth_ldap_bind	(original)
+++ trunk/plugins/auth/auth_ldap_bind	Tue Apr 12 13:48:53 2005
@@ -60,7 +60,7 @@
   # find dn of user matching supplied username
   $ldh = Net::LDAP->new($ldhost, port=>$ldport, timeout=>$ldwait ) or
     $self->log(LOGALERT, "authldap/$method - error in initial conn" ) &&
-    return ( DECLINE, "authldap/$method - temporary auth error" );
+    return ( DECLINED, "authldap/$method - temporary auth error" );
 
   # find the user's DN
   $mesg = $ldh->search(
@@ -71,12 +71,12 @@
     timeout=>$ldwait,
     sizelimit=>'1') or 
       $self->log(LOGALERT, "authldap/$method - err in search for user" ) &&
-      return ( DECLINE, "authldap/$method - temporary auth error" );
+      return ( DECLINED, "authldap/$method - temporary auth error" );
 
   # deal with errors if they exist
   if ( $mesg->code ) {
     $self->log(LOGALERT, "authldap/$method - err " . $mesg->code . " in search for user" );
-    return ( DECLINE, "authldap/$method - temporary auth error" );
+    return ( DECLINED, "authldap/$method - temporary auth error" );
   }
 
   # unbind, so as to allow a rebind below
@@ -86,7 +86,7 @@
   if (($mesg->count) && ($lduserdn = $mesg->entry->dn)) {
     $ldh = Net::LDAP->new($ldhost, port=>$ldport, timeout=>$ldwait ) or
       $self->log(LOGALERT, "authldap/$method - err in user conn" ) &&
-        return ( DECLINE, "authldap/$method - temporary auth error" );
+        return ( DECLINED, "authldap/$method - temporary auth error" );
 	
     # here's the whole reason for the script
     $mesg = $ldh->bind($lduserdn, password=>$passClear, timeout=>$ldwait);
@@ -95,7 +95,7 @@
     # deal with errors if they exist, or allow success
     if ( $mesg->code ) {
       $self->log(LOGALERT, "authldap/$method - error in user bind" );
-      return ( DENY, "authldap/$method - wrong username or password" );
+      return ( DECLINED, "authldap/$method - wrong username or password" );
     } else {
       $self->log( LOGINFO, "authldap/$method - $user auth success" );
       $self->log( LOGDEBUG, "authldap/$method - user: $user, pass: $passClear" );
@@ -105,7 +105,7 @@
   # if the plugin couldn't find user's entry
   } else {
     $self->log(LOGALERT, "authldap/$method - user not found" ) &&
-      return ( DECLINE, "authldap/$method - wrong username or password" );
+      return ( DECLINED, "authldap/$method - wrong username or password" );
   }
 
   $ldh->disconnect;