diff options
author | Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com> | 2019-03-02 22:07:03 +0530 |
---|---|---|
committer | Tom Joseph <tomjoseph@in.ibm.com> | 2019-03-25 11:54:24 +0000 |
commit | 2fe9282fc4f05626bb42566530a4b618e40b7f22 (patch) | |
tree | 1c9e88458318edb2ba42aa3ccad6f60eb4c5eb3c | |
parent | 55768e3548ef7476d4fdbe7be7a3ddb4d4896f14 (diff) | |
download | phosphor-host-ipmid-2fe9282fc4f05626bb42566530a4b618e40b7f22.tar.gz phosphor-host-ipmid-2fe9282fc4f05626bb42566530a4b618e40b7f22.zip |
[User Mgmt]: Update local user enabled state cache
Added missing user enabled state update, to reflect the
enabled state immediately.
Tested-by:
1.verified updated user enabled state is reflected immediately
by querying getaccess for the user id
Change-Id: I42f7cbbe5a1bec9ffaafa61d5c550ea914bddc9c
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
-rw-r--r-- | user_channel/user_mgmt.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/user_channel/user_mgmt.cpp b/user_channel/user_mgmt.cpp index a21da8c..86f51da 100644 --- a/user_channel/user_mgmt.cpp +++ b/user_channel/user_mgmt.cpp @@ -658,6 +658,16 @@ ipmi_ret_t UserAccess::setUserEnabledState(const uint8_t userId, std::string userPath = std::string(userObjBasePath) + "/" + userName; setDbusProperty(bus, getUserServiceName(), userPath, usersInterface, userEnabledProperty, enabledState); + userInfo->userEnabled = enabledState; + try + { + writeUserData(); + } + catch (const std::exception& e) + { + log<level::DEBUG>("Write user data failed"); + return IPMI_CC_UNSPECIFIED_ERROR; + } } return IPMI_CC_OK; } |