directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r1094190 - /directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java
Date Sun, 17 Apr 2011 19:32:29 GMT
Author: kayyagari
Date: Sun Apr 17 19:32:29 2011
New Revision: 1094190

URL: http://svn.apache.org/viewvc?rev=1094190&view=rev
Log:
o lock account permanently if the lockout duration is zero

Modified:
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java?rev=1094190&r1=1094189&r2=1094190&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java
Sun Apr 17 19:32:29 2011
@@ -981,7 +981,17 @@ public class AuthenticationInterceptor e
                 if ( policyConfig.isPwdLockout() && ( numFailures >= policyConfig.getPwdMaxFailure()
) )
                 {
                     Attribute pwdAccountLockedTimeAt = new DefaultAttribute( AT_PWD_ACCOUNT_LOCKED_TIME
);
-                    pwdAccountLockedTimeAt.add( failureTime );
+
+                    // if zero, lockout permanently, only admin can unlock it
+                    if ( policyConfig.getPwdLockoutDuration() == 0 )
+                    {
+                        pwdAccountLockedTimeAt.add( "000001010000Z" );
+                    }
+                    else
+                    {
+                        pwdAccountLockedTimeAt.add( failureTime );
+                    }
+                    
                     Modification pwdAccountLockedMod = new DefaultModification( ADD_ATTRIBUTE,
pwdAccountLockedTimeAt );
                     mods.add( pwdAccountLockedMod );
 



Mime
View raw message