Return-Path: Delivered-To: apmail-directory-commits-archive@www.apache.org Received: (qmail 56463 invoked from network); 3 Jan 2011 12:57:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Jan 2011 12:57:36 -0000 Received: (qmail 25469 invoked by uid 500); 3 Jan 2011 12:57:36 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 25408 invoked by uid 500); 3 Jan 2011 12:57:36 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 25401 invoked by uid 99); 3 Jan 2011 12:57:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Jan 2011 12:57:35 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Jan 2011 12:57:33 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id B7EFA23889DE; Mon, 3 Jan 2011 12:57:12 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1054601 - /directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/PasswordPolicyConfiguration.java Date: Mon, 03 Jan 2011 12:57:12 -0000 To: commits@directory.apache.org From: pamarcelot@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110103125712.B7EFA23889DE@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: pamarcelot Date: Mon Jan 3 12:57:12 2011 New Revision: 1054601 URL: http://svn.apache.org/viewvc?rev=1054601&view=rev Log: Explicitly set default values. Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/PasswordPolicyConfiguration.java Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/PasswordPolicyConfiguration.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/PasswordPolicyConfiguration.java?rev=1054601&r1=1054600&r2=1054601&view=diff ============================================================================== --- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/PasswordPolicyConfiguration.java (original) +++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/PasswordPolicyConfiguration.java Mon Jan 3 12:57:12 2011 @@ -49,7 +49,7 @@ public class PasswordPolicyConfiguration * Default value is 0, does not expire. If not 0, the value must be greater than or equal * to the value of the pwdMinAge. */ - private int pwdMaxAge; + private int pwdMaxAge = 0; /** * specifies the maximum number of used passwords stored in the pwdHistory attribute. @@ -97,7 +97,7 @@ public class PasswordPolicyConfiguration * consecutive failed bind attempts. The maximum number of consecutive * failed bind attempts is specified in {@link #pwdMaxFailure} */ - private boolean pwdLockout; + private boolean pwdLockout = false; /** * the number of seconds that the password cannot be used to authenticate due to @@ -111,13 +111,13 @@ public class PasswordPolicyConfiguration * be used to authenticate. * Default value is 0, no limit on the number of authentication failures */ - private int pwdMaxFailure; + private int pwdMaxFailure = 0; /** * the number of seconds after which the password failures are purged from the failure counter. * Default value is 0, reset all pwdFailureTimes after a successful authentication. */ - private int pwdFailureCountInterval; + private int pwdFailureCountInterval = 0; /** * flag to indicate if the password must be changed by the user after they bind to the @@ -143,13 +143,13 @@ public class PasswordPolicyConfiguration private int pwdMinDelay = 0; /** the maximum number of seconds to delay when responding to a failed authentication attempt.*/ - private int pwdMaxDelay; + private int pwdMaxDelay = 0; /** * the number of seconds an account may remain unused before it becomes locked * Default value is 0, no check for idle time. */ - private int pwdMaxIdle; + private int pwdMaxIdle = 0; public String getPwdAttribute() @@ -473,7 +473,7 @@ public class PasswordPolicyConfiguration sb.append( ++errCount ).append( ". password failure count interval time cannot be negative\n" ); } - if ( ( ( pwdMinDelay > 0 ) && ( pwdMaxDelay <= 0 ) ) + if ( ( ( pwdMinDelay > 0 ) && ( pwdMaxDelay <= 0 ) ) || ( ( pwdMaxDelay > 0 ) && ( pwdMinDelay <= 0 ) ) ) { sb