Do not reset current attempt when max attempt is reset. 33/120933/1
authorDongsun Lee <ds73.lee@samsung.com>
Sun, 26 Mar 2017 15:23:05 +0000 (00:23 +0900)
committerDongsun Lee <ds73.lee@samsung.com>
Mon, 27 Mar 2017 00:18:40 +0000 (09:18 +0900)
- Platform policy changed.
- When max attempt is reset,
  the password with the current attempt over new max attempt is not valid any more.

Change-Id: I47ffb6ec252f166a10da69072005a059401d5842
Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
src/server/service/password-manager.cpp

index 2bf2df4616cac1dad304f5dd1036937902683d83..d770ef43d691d304f7dab8cdbf6f263bcad575d5 100644 (file)
@@ -384,8 +384,10 @@ void PasswordManager::setPasswordMaxAttempts(unsigned int receivedUser,
        PasswordFileMap::iterator itPwd = m_pwdFile.find(receivedUser);
        itPwd->second.setMaxAttempt(receivedAttempts);
        itPwd->second.writeMemoryToFile();
-       itPwd->second.resetAttempt();
-       itPwd->second.writeAttemptToFile();
+       // Do not reset current attempt when max attempt is reset.
+       // It's a platform policy(2017.0327).
+       //itPwd->second.resetAttempt();
+       //itPwd->second.writeAttemptToFile();
 }
 
 void PasswordManager::setPasswordValidity(unsigned int receivedUser,