summaryrefslogtreecommitdiffstats
path: root/user_channel/passwd_mgr.hpp
diff options
context:
space:
mode:
authorRichard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>2018-09-21 12:28:57 +0530
committerRichard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>2018-11-13 15:41:17 +0530
commit42bed64d8e34d55bae9ab8fb395a00ce412dcd8e (patch)
tree0c23e93b2e101d018deb82561760c54202bdc39a /user_channel/passwd_mgr.hpp
parentb29b5ab3b9ad812949f3621a4422fde8d7c1c8d2 (diff)
downloadphosphor-host-ipmid-42bed64d8e34d55bae9ab8fb395a00ce412dcd8e.tar.gz
phosphor-host-ipmid-42bed64d8e34d55bae9ab8fb395a00ce412dcd8e.zip
IPMI password entry cleanup
Whenever user is removed from the system, password map in IPMI database has to be cleaned up. Similarly password entry must be updated when user rename happens. This commit add's API changes for the same Change-Id: I304c721b31fc7fbad019c85d8ca2ecc60ca398d8 Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
Diffstat (limited to 'user_channel/passwd_mgr.hpp')
-rw-r--r--user_channel/passwd_mgr.hpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/user_channel/passwd_mgr.hpp b/user_channel/passwd_mgr.hpp
index e5625bc..a444522 100644
--- a/user_channel/passwd_mgr.hpp
+++ b/user_channel/passwd_mgr.hpp
@@ -46,13 +46,17 @@ class PasswdMgr
*/
std::string getPasswdByUserName(const std::string& userName);
- /** @brief Clear username and password entry for the specified user
+ /** @brief Update / clear username and password entry for the specified
+ * user
*
- * @param[in] userName - username
+ * @param[in] userName - user name that has to be renamed / deleted
+ * @param[in] newUserName - new user name. If empty, userName will be
+ * deleted.
*
* @return error response
*/
- int clearUserEntry(const std::string& userName);
+ int updateUserEntry(const std::string& userName,
+ const std::string& newUserName);
private:
using UserName = std::string;
@@ -81,11 +85,14 @@ class PasswdMgr
/** @brief Updates special password file by clearing the password entry
* for the user specified.
*
- * @param[in] userName - user name entry that has to be removed.
+ * @param[in] userName - user name that has to be renamed / deleted
+ * @param[in] newUserName - new user name. If empty, userName will be
+ * deleted.
*
* @return error response
*/
- int updatePasswdSpecialFile(const std::string& userName);
+ int updatePasswdSpecialFile(const std::string& userName,
+ const std::string& newUserName);
/** @brief encrypts or decrypt the data provided
*
* @param[in] doEncrypt - do encrypt if set to true, else do decrypt.
OpenPOWER on IntegriCloud