summaryrefslogtreecommitdiffstats
path: root/command/session_cmds.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Cache the user & channel acces in sessionRichard Marian Thomaiyar2019-04-021-22/+4
| | | | | | | | | | | | | Instead of querying the user & channel access for every time cache the same during session creation, and use it for enforcements. Tested-by: Verified that RMCP+ session establishment works as expected including INSUFFICIENT_PRIVILEGE error. Change-Id: Ib5a05bd07cc9aabf2625a18090fd905d93489b24 Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
* Convert host-ipmid -> libipmidWilliam A. Kennington III2019-02-191-1/+1
| | | | | | | | | phosphor-host-ipmid now exposes a library along with headers for interfacing with the ipmi daemon. Compile and link against the new library. Change-Id: Ifb914004df2b73cff913bf653db14ff2e710434f Signed-off-by: William A. Kennington III <wak@google.com>
* Return the maximum privilege in open session commandTom Joseph2019-02-121-2/+2
| | | | | | | | | | | | | | | | | | This commit does the following: - Set the maximum privilege role in the session instead of current privilege in the implementation of the open session request/response. - In open session response, return the maximum privilege of the session instead of the current privilege level. - Update RAKP12 and RAKP34 implementation Tested: Checked the session setup works fine with ipmitool and freeipmi utility ipmipower. Change-Id: I41b63b91f08c2ed96856c4db41eedaa878c663e3 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* netipmid: replace std::cerr with phosphor::logging callsVernon Mauery2018-12-191-1/+0
| | | | | | | | This is part of a cleanup and standardization effort of code to get existing code up to date. Change-Id: I0c982ef8d7afa2f56a9cd204bb8ac3112769641c Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* Revert "W/A for CI test case - Accept empty user name"Richard Marian Thomaiyar2018-12-061-12/+0
| | | | | | | | | | | | This reverts commit d2563c52eea33c2e4575f34eddac564ba1a44d85. As CI test cases are updated to work with mandatory -U options, this commit is reverted. Going forward in order to establish a RMCP+ session, user name with -U option is mandatory Change-Id: I2e1405562f0c20d34b2fcd5a2bba668c87cc7f06 Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
* W/A for CI test case - Accept empty user nameRichard Marian Thomaiyar2018-11-291-0/+12
| | | | | | | | | | | | | | | W/A code added for CI Test cases to pass, which uses empty user name with 0penBmc as password. The following code allows the same to keep the test case going. This commit has to be removed once test cases are updated to include "-U root" option. Unit-Test: 1. Verfied by issuing ipmitool -I lanplus -C 3 -H X.X.X.X -P 0penBmc raw 6 1 Change-Id: I9e9d6ead0630a553efbd66d6bbee3ddb7eef527e Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
* RMCP+ login support with privilegeRichard Marian Thomaiyar2018-11-211-4/+42
| | | | | | | | | | | | | Implementation of RMCP login support with appropriate privilege level. Unit Test: 1. Verified that user is able to login without any issues 2. Privilege of the user is minimum of requested, user & channel 3. Unable to set higher privilege using Set session commands Change-Id: I5e9ef21dfc1f1b50aa815562a3a65d90c434877c Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
* netipmid: use std::shared_ptr instead of weak_ptr/lockVernon Mauery2018-11-061-3/+2
| | | | | | | | | | | | | All of the instances of getSession and startSession were assigning the result to a local shared_ptr via lock on the weak_ptr. It doesn't make sense to demote the shared_ptr (from the sessionsMap) to a weak_ptr via the return, only to promote to a shared_ptr again via lock. Tested-by: running ipmitool -H a.b.c.d -P 0penBmc -I lanplus mc info Sessions start and stop, same as before. Change-Id: Ic10779285891d73ee51115f16ed0000b38d1c52a Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* netipmid: apply clang-format rulesVernon Mauery2018-11-021-18/+21
| | | | | | | | Lots of whitespace change. Let clang-format do its job and keep the code looking nice. Change-Id: Idfcad1a99cab8170d55a06163de8ad3f420b68b7 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* Patch #2 Reducing IPMI logging footprintNagaraju Goruganti2018-04-021-7/+0
| | | | | | | | | | net-ipmid is noisy in terms of journal logging. A small step towards cleaning that up. Partially Resolves openbmc/openbmc#2507 Change-Id: I78e0286fb37086373c86dca276c0948f4595cb0a Signed-off-by: Nagaraju Goruganti <ngorugan@in.ibm.com>
* Change the signature of the command handler functions.Tom Joseph2017-04-251-5/+7
| | | | | | | Resolves openbmc/openbmc#857 Change-Id: I0b7ca6665dd89629838a238d77aff67fec1818c7 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Session Commands ImplementationTom Joseph2017-01-091-0/+79
Implements Set Session Privilege Command and Close Session command. Change-Id: I18aeee7bcae48db3eb8a61292c9333ca2304dcf1 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
OpenPOWER on IntegriCloud