[PATCH openpower-host-ipmi-oem v2] Support for restricted mode for IPMI commands
OpenBMC Patches
openbmc-patches at stwcx.xyz
Thu Apr 7 17:20:32 AEST 2016
From: tomjose <tomjoseph at in.ibm.com>
---
oemhandler.C | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/oemhandler.C b/oemhandler.C
index 22452d6..ce7faca 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";
@@ -81,6 +82,11 @@ ipmi_ret_t ipmi_ibm_oem_prep_fw_update(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
ipmi_ret_t ipmi_rc = IPMI_CC_OK;
*data_len = 0;
+ if(restricted_mode)
+ {
+ return IPMI_CC_INSUFFICIENT_PRIVILEGE;
+ }
+
int rc = 0;
std::ofstream rwfs_file;
const char *busname = "org.openbmc.control.Bmc";
--
2.7.1
More information about the openbmc
mailing list