user_mgmt: update default ipmi_user.json file.
By default, Serial Over LAN (SOL) payload access should be enabled
for all users in all channels. Ensure that this clause is met when
default ipmi_user.json file is created, usually because of BMC
re-flashing.
Tested-by:
1. Check SOL payload access values in ipmi_user.json after reflashing.
// Command - grep "std_payload1" /var/lib/ipmi/ipmi_user.json
// Response - OK.
...
"payload_enabled":{..."std_payload1":[true,true,...]...},
...
2. Check SOL payload access values in ipmi_user.json after BMC FW update
// Command and Response same as (1.). OK.
// ipmi_user.json file is updated upon its first write after FW update.
Signed-off-by: Saravanan Palanisamy <saravanan.palanisamy@linux.intel.com>
Change-Id: I604aac6d000eac40a3a3460ea46c6fe81d285dee
diff --git a/user_channel/user_mgmt.cpp b/user_channel/user_mgmt.cpp
index f835247..000e9b1 100644
--- a/user_channel/user_mgmt.cpp
+++ b/user_channel/user_mgmt.cpp
@@ -1591,6 +1591,10 @@
{
usersTbl.user[userIndex].userPrivAccess[chIndex].privilege =
privNoAccess;
+ usersTbl.user[userIndex]
+ .payloadAccess[chIndex]
+ .stdPayloadEnables1[static_cast<uint8_t>(
+ ipmi::PayloadType::SOL)] = true;
}
}
writeUserData();