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/README.md b/README.md
index 5f6f68e..e80f6ba 100644
--- a/README.md
+++ b/README.md
@@ -15,4 +15,5 @@
## Supported Commands
- Partial Add
- Prepare for host update
+- Reset BMC password
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';
diff --git a/oemhandler.hpp b/oemhandler.hpp
index 2de4657..beb6901 100644
--- a/oemhandler.hpp
+++ b/oemhandler.hpp
@@ -10,6 +10,7 @@
enum ipmi_netfn_oem_cmds
{
IPMI_CMD_PREP_FW_UPDATE = 0x10,
+ IPMI_CMD_RESET_BMC_PASSWORD = 0x11,
IPMI_CMD_PESEL = 0xF0,
IPMI_CMD_OCC_RESET = 0x0E,
};