Add IPMI Privilege Level for commands
Package the library into /usr/lib/ipmid-providers.
Change-Id: I2cb2d12ce99d11ddfe528cb1c30bb2313cfc4dc8
Signed-off-by: Tom <tomjoseph@in.ibm.com>
diff --git a/Makefile.am b/Makefile.am
index 2d7a18d..3ebcdb8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,4 @@
-liboemhandlerdir = ${libdir}/host-ipmid
+liboemhandlerdir = ${libdir}/ipmid-providers
liboemhandler_LTLIBRARIES = liboemhandler.la
liboemhandler_la_SOURCES = oemhandler.cpp
liboemhandler_la_LDFLAGS = $(SYSTEMD_LIBS) -version-info 0:0:0 -shared
diff --git a/oemhandler.cpp b/oemhandler.cpp
index ed26e93..013bf94 100644
--- a/oemhandler.cpp
+++ b/oemhandler.cpp
@@ -141,11 +141,13 @@
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);
+ 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,
+ SYSTEM_INTERFACE);
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,
+ SYSTEM_INTERFACE);
- return;
+ return;
}