[PATCH openpower-host-ipmi-oem v3] Support for restricted mode for IPMI commands

OpenBMC Patches openbmc-patches at stwcx.xyz
Thu May 19 03:30:37 AEST 2016


From: tomjose <tomjoseph at in.ibm.com>

---
 oemhandler.C | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/oemhandler.C b/oemhandler.C
index 22452d6..72fbea7 100644
--- a/oemhandler.C
+++ b/oemhandler.C
@@ -5,6 +5,7 @@
 #include <string.h>
 #include <systemd/sd-bus.h>
 
+
 void register_netfn_oem_partial_esel() __attribute__((constructor));
 
 const char *g_esel_path = "/tmp/esel";
@@ -122,10 +123,12 @@ ipmi_ret_t ipmi_ibm_oem_prep_fw_update(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
 void register_netfn_oem_partial_esel()
 {
 	printf("Registering NetFn:[0x%X], Cmd:[0x%X]\n",NETFUN_OEM, IPMI_CMD_PESEL);
-	ipmi_register_callback(NETFUN_OEM, IPMI_CMD_PESEL, NULL, ipmi_ibm_oem_partial_esel);
+	ipmi_register_callback(NETFUN_OEM, IPMI_CMD_PESEL, NULL, ipmi_ibm_oem_partial_esel,
+                                                                 IPMI_WHITELISTED_COMMAND);
 
     printf("Registering NetFn:[0x%X], Cmd:[0x%X]\n", NETFUN_OEM, IPMI_CMD_PREP_FW_UPDATE);
-    ipmi_register_callback(NETFUN_OEM, IPMI_CMD_PREP_FW_UPDATE, NULL, ipmi_ibm_oem_prep_fw_update);
+    ipmi_register_callback(NETFUN_OEM, IPMI_CMD_PREP_FW_UPDATE, NULL, ipmi_ibm_oem_prep_fw_update, 
+                                                                        IPMI_BLACKLISTED_COMMAND);
 
 	return;
 }
-- 
2.8.2




More information about the openbmc mailing list