Remove retry timeout check
authorLukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Mon, 9 Dec 2013 15:36:16 +0000 (16:36 +0100)
committerBartlomiej Grzelewski <b.grzelewski@samsung.com>
Thu, 6 Feb 2014 16:13:25 +0000 (17:13 +0100)
[Issue#]       SSDWSSP-709
[Feature/Bug]  Retry timeout check is not required
[Problem]      Rapid password check sequences should be possible.
[Cause]        Retry timeout check cause may cause unnecessary failure.
[Solution]     Remove retry timeout check.
[Verification] Succesfull build and run of tests:
               security-tests.sh ss-password --output=text
               --regexp=no_retry_timeout

Change-Id: I802e5e067792182fcf7a5833f608bfb63e84b468

src/server/service/password-manager.cpp

index cf9c3a1..55a9b2b 100644 (file)
@@ -63,11 +63,6 @@ namespace SecurityServer
     int PasswordManager::isPwdValid(unsigned int &currentAttempt, unsigned int &maxAttempt,
                                     unsigned int &expirationTime) const
     {
-        if (m_pwdFile.isIgnorePeriod()) {
-            LogError("Retry timeout occured.");
-            return SECURITY_SERVER_API_ERROR_PASSWORD_RETRY_TIMER;
-        }
-
         if (!m_pwdFile.isPasswordActive()) {
             LogError("Current password not active.");
             return SECURITY_SERVER_API_ERROR_NO_PASSWORD;
@@ -135,7 +130,6 @@ namespace SecurityServer
 
         unsigned int valid_secs = 0;
 
-        //check retry timer
         if (m_pwdFile.isIgnorePeriod()) {
             LogError("Retry timeout occured.");
             return SECURITY_SERVER_API_ERROR_PASSWORD_RETRY_TIMER;
@@ -235,11 +229,6 @@ namespace SecurityServer
     {
         unsigned int valid_secs = 0;
 
-        if (m_pwdFile.isIgnorePeriod()) {
-            LogError("Retry timeout occured.");
-            return SECURITY_SERVER_API_ERROR_PASSWORD_RETRY_TIMER;
-        }
-
         if(!calculateExpiredTime(receivedDays, valid_secs))
             return SECURITY_SERVER_API_ERROR_INPUT_PARAM;
 
@@ -262,12 +251,6 @@ namespace SecurityServer
             return SECURITY_SERVER_API_ERROR_INPUT_PARAM;
         }
 
-        // check retry time
-        if (m_pwdFile.isIgnorePeriod()) {
-            LogError("Retry timeout occurred.");
-            return SECURITY_SERVER_API_ERROR_PASSWORD_RETRY_TIMER;
-        }
-
         m_pwdFile.setMaxHistorySize(history);
         m_pwdFile.writeMemoryToFile();