summaryrefslogtreecommitdiffstats
path: root/globalhandler.cpp
diff options
context:
space:
mode:
authorTom <tomjoseph@in.ibm.com>2016-09-06 17:21:23 +0530
committerTom Joseph <tomjoseph@in.ibm.com>2017-01-17 16:52:30 +0530
commit0573237f4521a0087153cded38814461c8978262 (patch)
tree94e7345d7b34c81a436ab6c7e46554762e0a0718 /globalhandler.cpp
parent9e5232e59573ae4ddc6dd2064a813fd650dd0695 (diff)
downloadphosphor-host-ipmid-0573237f4521a0087153cded38814461c8978262.tar.gz
phosphor-host-ipmid-0573237f4521a0087153cded38814461c8978262.zip
Add privilege level for each IPMI command
Change-Id: I07f160c6ea83dc91f46e21f263c4cf994aff081d Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
Diffstat (limited to 'globalhandler.cpp')
-rw-r--r--globalhandler.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/globalhandler.cpp b/globalhandler.cpp
index 34b244f..304867c 100644
--- a/globalhandler.cpp
+++ b/globalhandler.cpp
@@ -93,11 +93,15 @@ ipmi_ret_t ipmi_global_cold_reset(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
void register_netfn_global_functions()
{
+ // Cold Reset
printf("Registering NetFn:[0x%X], Cmd:[0x%X]\n",NETFUN_APP, IPMI_CMD_COLD_RESET);
- ipmi_register_callback(NETFUN_APP, IPMI_CMD_COLD_RESET, NULL, ipmi_global_cold_reset);
+ ipmi_register_callback(NETFUN_APP, IPMI_CMD_COLD_RESET, NULL, ipmi_global_cold_reset,
+ PRIVILEGE_ADMIN);
+ // <Warm Reset>
printf("Registering NetFn:[0x%X], Cmd:[0x%X]\n",NETFUN_APP, IPMI_CMD_WARM_RESET);
- ipmi_register_callback(NETFUN_APP, IPMI_CMD_WARM_RESET, NULL, ipmi_global_warm_reset);
+ ipmi_register_callback(NETFUN_APP, IPMI_CMD_WARM_RESET, NULL, ipmi_global_warm_reset,
+ PRIVILEGE_ADMIN);
return;
}
OpenPOWER on IntegriCloud