Fix command privilege for Get LAN Configuration command
The Get LAN Configuration command, per the IPMI 2.0 spec, has Operator
privilege, not administrator privilege. This is per Table G, Command
Number and Privilege Levels.
Tested:
ipmitool -I lanplus -H obmcjgmwfp -U root -P <pw> lan print
Set in Progress : Set Complete
Auth Type Support :
Auth Type Enable : Callback :
: User :
: Operator :
: Admin :
: OEM :
IP Address Source : DHCP Address
IP Address : 10.243.48.108
Subnet Mask : 255.255.254.0
MAC Address : de:a4:84:d7:2c:28
Default Gateway IP : 10.243.48.1
Default Gateway MAC : 00:00:00:00:00:00
802.1q VLAN ID : Disabled
RMCP+ Cipher Suites : 3,17
Cipher Suite Priv Max : Not Available
Bad Password Threshold : Not Available
ipmitool -I lanplus -H obmcjgmwfp -U operator1 -P <pw> -L operator lan print
Set in Progress : Set Complete
Auth Type Support :
Auth Type Enable : Callback :
: User :
: Operator :
: Admin :
: OEM :
IP Address Source : DHCP Address
IP Address : 10.243.48.108
Subnet Mask : 255.255.254.0
MAC Address : de:a4:84:d7:2c:28
Default Gateway IP : 10.243.48.1
Default Gateway MAC : 00:00:00:00:00:00
802.1q VLAN ID : Disabled
RMCP+ Cipher Suites : 3,17
Cipher Suite Priv Max : Not Available
Bad Password Threshold : Not Available
ipmitool -I lanplus -H obmcjgmwfp -U operator1 -P <pw> lan print
Set Session Privilege Level to ADMINISTRATOR failed: Unknown (0x81)
Error: Unable to establish IPMI v2 / RMCP+ session
Change-Id: I4928c34b68e8f28d2356ff49890daa536bd39b5f
Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
diff --git a/transporthandler.cpp b/transporthandler.cpp
index a88e0a2..74d1817 100644
--- a/transporthandler.cpp
+++ b/transporthandler.cpp
@@ -1476,5 +1476,5 @@
ipmi::Privilege::Admin, ipmi::transport::setLan);
ipmi::registerHandler(ipmi::prioOpenBmcBase, ipmi::netFnTransport,
ipmi::transport::cmdGetLanConfigParameters,
- ipmi::Privilege::Admin, ipmi::transport::getLan);
+ ipmi::Privilege::Operator, ipmi::transport::getLan);
}