Define new IBM OEM cmd to reset BMC password
Create a new OEM command to perform a reset of the BMC root
password. It'll also re-enable the local account if it had
been disabled.
The implementation will be added in subsequent commits, for
this first change just define the new function enum.
Change-Id: I54d8b6e5ce34a2a02b0142788a32cb5edf64b451
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
diff --git a/oemhandler.cpp b/oemhandler.cpp
index 8655188..8e1981f 100644
--- a/oemhandler.cpp
+++ b/oemhandler.cpp
@@ -205,6 +205,15 @@
return ipmi_rc;
}
+ipmi_ret_t ipmi_ibm_oem_reset_bmc_password(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
+ ipmi_request_t request,
+ ipmi_response_t response,
+ ipmi_data_len_t data_len,
+ ipmi_context_t context)
+{
+ return IPMI_CC_OK;
+}
+
namespace {
// Storage to keep the object alive during process life
std::unique_ptr<open_power::host::command::Host> opHost
@@ -223,6 +232,9 @@
ipmi_register_callback(NETFUN_OEM, IPMI_CMD_PREP_FW_UPDATE, NULL, ipmi_ibm_oem_prep_fw_update,
SYSTEM_INTERFACE);
+ ipmi_register_callback(NETFUN_IBM_OEM, IPMI_CMD_RESET_BMC_PASSWORD, NULL,
+ ipmi_ibm_oem_reset_bmc_password, SYSTEM_INTERFACE);
+
// Create new object on the bus
auto objPath = std::string{CONTROL_HOST_OBJ_MGR} + '/' + HOST_NAME + '0';