summaryrefslogtreecommitdiffstats
path: root/users.cpp
diff options
context:
space:
mode:
authorRichard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>2018-06-13 16:51:00 +0530
committerRichard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>2018-10-09 03:19:19 +0530
commitc704519ef29cf46473eddb670f311eead83c357d (patch)
tree2dc5357933c6756d5ebd3431e1a2143d871e4474 /users.cpp
parent9164fd9b15e7af88e8b80c7ed7dad45266327a57 (diff)
downloadphosphor-user-manager-c704519ef29cf46473eddb670f311eead83c357d.tar.gz
phosphor-user-manager-c704519ef29cf46473eddb670f311eead83c357d.zip
Add support for user locked state property
Support for user locked state property using pam_tally2 application added. Change-Id: Ia77ff6527c15c93ac272110950e99fff56dcbaa6 Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com> Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'users.cpp')
-rw-r--r--users.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/users.cpp b/users.cpp
index c904916..84c401d 100644
--- a/users.cpp
+++ b/users.cpp
@@ -142,5 +142,29 @@ bool Users::userEnabled(bool value)
return UsersIface::userEnabled(value);
}
+/** @brief lists user locked state for failed attempt
+ *
+ **/
+bool Users::userLockedForFailedAttempt(void) const
+{
+ return manager.userLockedForFailedAttempt(userName);
+}
+
+/** @brief unlock user locked state for failed attempt
+ *
+ * @param[in]: value - false - unlock user account, true - no action taken
+ **/
+bool Users::userLockedForFailedAttempt(bool value)
+{
+ if (value != false)
+ {
+ return userLockedForFailedAttempt();
+ }
+ else
+ {
+ return manager.userLockedForFailedAttempt(userName, value);
+ }
+}
+
} // namespace user
} // namespace phosphor
OpenPOWER on IntegriCloud