summaryrefslogtreecommitdiffstats
path: root/user_channel
Commit message (Collapse)AuthorAgeFilesLines
* remove usage of sdbusplus::message::variantVernon Mauery2019-05-143-5/+6
| | | | | | | | | | | sdbusplus has had its alias of std::variant in place for long enough. This changes all ipmid references to use std::variant directly instead of the sdbusplus alias. Tested-by: building and running ipmid Change-Id: Id5b4136d4589aa598815edd3ef4202e64a7698e2 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* user-mgmt: sync ipmi user & channel conf fileRichard Marian Thomaiyar2019-05-142-18/+41
| | | | | | | | | | | | | | | | | | | ipmi_user.json file is stored in non-volatile memory, and it is necessary to make sure that file is properly synced to the storage device, to avoid any corruption issue related to power loss. This fix makes sure that temporary file is fully synced with storage device and then renamed, such that the file is either in old state or in new updated state. Same is also performed for channel configuration file too. Tested: 1. Verified regular ipmi user list & channel works without any issue 2. Verifid that any power loss, immediately, once the file is written doesn't corrupt the entries. Change-Id: I9ef84573947ab6f85f66530ac4a20e9eeaddf283 Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
* look up channel from D-Bus connectionVernon Mauery2019-04-223-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | With a single IPMI execution queue and multiple bridges, it is important for the queue to be able to map the incoming D-Bus message to a channel. Each bridge should request a well-known name of the form "xyz.openbmc_project.Ipmi.Channel.<name>" where name is the name field in the /usr/share/ipmi-providers/channel_config.json file. The mapping is done by registering a name change listener on D-Bus and then doing some name lookups via the D-Bus interface to match well-known names to unique names. Then, each incoming messages comes from a unique-named sender and can be resolved to which channel it came from. For now, any unmapped channels will show up as INTRABMC, which is not ideal, but should not break things until the bridges can be converted to the correct name and D-Bus API. Tested-by: run ipmid, start and stop bridges named xyz.openbmc_project.Ipmi.Channel.<NAME> and see the messages show that a new channel has been mapped. Then, with commands that use the ipmi::Context, the correct channel shows up. Change-Id: I3e6bbfbf2e068020e07eeafe64eb09d70c03dc65 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* API support to update password for special userRichard Marian Thomaiyar2019-04-224-0/+37
| | | | | | | | | | | | | | | | Provide API support to update password for special user. This API will be used by OEM Command to update the special user password - linux uid 0 (root user). More details can be referred from https://github.com/openbmc/docs/blob/master/user_management.md#deployment---out-of-factory Tested: 1. Verified the API with OEM command implementation, and able to configure the password for user exists in the system /etc/passwd. 2. Verified the negative case for failure Change-Id: I3c2a7007587e52c7e713f0cd976f249dd84a5f75 Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
* move variant to std namespaceVernon Mauery2019-04-182-16/+11
| | | | | | | | | | | sdbusplus::message::variant_ns has been std for a while now. This moves ipmid away from sdbusplus::message::variant_ns to directly use std::variant. Tested-by: built, compiles, and runs the same as before. Change-Id: I8caa945f31c926c2721319f001b9d7f83fd3f1b7 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* Rewrite set & get user access cmd to new providerRichard Marian Thomaiyar2019-04-161-146/+118
| | | | | | | | | | | | | Rewritten Get & Set user access command to new provider API. Note: This is ready for channel number 0xE handling. Tested: 1. Verified ipmitool user list command in both host & netipmid 2. verified ipmitool raw get & set user access command and cross verified it with negative cases Change-Id: Idbe19bc5a73decb9868663bd12683b826956fe4f Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
* Support - Get channel capabilities in host intfsmriti2019-04-091-0/+89
| | | | | | | | | | | | | | | | | | Support added for get channel authentication capabilities command to be responded in host interface too, by adding the same under user commands provider library. Tested: 1. verified by executing raw command ipmitool raw 6 0x38 1 1 //Command 01 80 04 02 00 00 00 00 //Response 2. verified by giving invalid Channel Number and response as 0xcc ipmitool raw 6 0x38 0x12 1 //Command Change-Id: Iafea68c432f9eeecd6a30098a0206dd97cab9b14 Signed-off-by: smriti <smriti.ayushi@intel.com> Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com> Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* Add: Get channel payload support commandSaravanan Palanisamy2019-04-093-0/+128
| | | | | | | | | | | | | | | | | | Implemented Get Channel Payload Support command (IPMI Spec sec 24.8) The same is implemented under channel commands, and will be available for both Host & Net ipmid. Uses channel configuration to differentiate between session / session-less channel Tested-by: 1. Verified command executed successfully for session based channel ipmitool raw 6 0x4E 0x1 // Command 03 00 15 00 00 00 00 00 // Response 2. Verified sessionless channel error is returned. Change-Id: I8b294234415b4467aeae6c23c192750471536f4e Signed-off-by: Saravanan Palanisamy <saravanan.palanisamy@intel.com> Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
* Only include ipmid/api.hpp for the new APIVernon Mauery2019-04-082-2/+1
| | | | | | | | | | | | | | After some feedback from users of the new IPMI API, they wanted to see two things: 1) don't require ipmid/api.hpp and ipmid/registration.hpp to be able to write new handlers 2) only require including ipmid/api.hpp (instead of ipmid/api.h) So now, by simply including ipmid/api.hpp instead of ipmid/api.h (deprecated), handlers incorporating the new IPMI API can be written. Change-Id: I446dcce70cff03d4ecc28c658292d052485f77fc Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* Add convert current channel number functionRichard Marian Thomaiyar2019-04-051-0/+20
| | | | | | | | | | | | | | Support for convert current channel number based on ipmi::Context is added. Tested: Verified by updating the channel number manually and function returns correctly. For correct value another gerrit patch is needed which will advertise proper channel from which the command originated. Change-Id: Id17d87b6a945b0264c8f14348a50bc2c087d187e Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
* Adding Set Password API support in UserlayerSuryakanth Sekar2019-03-266-78/+141
| | | | | | | | | | | | | | | | | | | | Moved the pam function from libusercommand to libuserlayer Added the setPassword API in user layer. There are modules which requires to use set password functionality (other ipmi providers-OEM),so it's better to keep the set-password abstracted in user-layer instead of user-commands. LIBS macro hold libpam and libmapper. we want to separate the libpam from lib usercommand. so,replaced LIBS with libmapper alone. Tested:Able to set the password in ipmi using userlayer. ex: ipmitool user set password <userid> <password> user password should set properly. Change-Id: I32d55ff5c042613c89805c6b9393d18cbf880461 Signed-off-by: Suryakanth Sekar <suryakanth.sekar@linux.intel.com>
* [User Mgmt]: Update local user enabled state cacheRichard Marian Thomaiyar2019-03-251-0/+10
| | | | | | | | | | | | Added missing user enabled state update, to reflect the enabled state immediately. Tested-by: 1.verified updated user enabled state is reflected immediately by querying getaccess for the user id Change-Id: I42f7cbbe5a1bec9ffaafa61d5c550ea914bddc9c Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
* Cleanup: Get rid of duplicate getChannelName()Richard Marian Thomaiyar2019-03-254-16/+3
| | | | | | | | | | | | Get rid of duplicate getChannelName function. Use the one with uint8_t channelNum. Tested-by: 1. Verified RMCP+ session establishement works with newly created user Change-Id: Iac22ec665ece97d4f9471cfb40220b472bdf01e8 Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
* ipmid: Compiler-generated unpacking and packing of messagesVernon Mauery2019-02-251-0/+2
| | | | | | | | | | | | | handler.hpp has the templated wrapping bits for ipmi command handler callbacks implemented. message.hpp has the serialization/deserialization of the ipmi data stream into packed tuples for functions. message/pack.hpp and message/unpack.hpp contain the actual serialization and deserialization of types. Change-Id: If997f8768c8488ab6ac022526a5ef9a1bce57fcb Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* ipmid: move channel code from libuserlayer to libchannellayerVernon Mauery2019-02-251-4/+4
| | | | | | | | | | | | Separate the channel implementation from the user implementation. It is possible to link only against the channel layer, but if code is using the user layer, it is likely to need both user and channel code. This makes it so that ipmid can support the notion of channels without supporting users. Change-Id: I3a7eb7c004e1c2f8aeb696180139cf68c2c4aac0 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* user_mgmt: drop c_str() when param is std::stringPatrick Venture2019-02-211-4/+4
| | | | | | | | | Do not use c_str() when parameter is std::string. Caught via cppcheck. Change-Id: Iad7c1296d8be363df10ccf9278231187d7d29052 Signed-off-by: Patrick Venture <venture@google.com>
* Create the libchannellayer library so it can split from libuserlayerVernon Mauery2019-02-121-1/+13
| | | | | | | | This will hold the channel manangement interface and implementation, which can be used separately from the libuserlayer. Change-Id: I06e7310223445cbb095f1e9caebc0e391afb704d Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* Set init_priority attribute for global variables in shared libLei YU2019-02-122-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | The code gets unspecified initializatio order for the global/static variables in a shared library. If unluck, a global/static variable may be initialized in *constructor* function, and then initialized by the default contructor. For exmaple, if `std::unique_ptr<xxx> var{nullptr};` is initialized in constructor function, below init order may occur: 1. It is initialized in constructor; 2. Then it is initialized as nullptr; And eventually when the code is to use the variable, we got nullptr. We met such issues before on openbmc/openbmc#1581, and the technical details could be found at [this SO question][1] and [this gcc email][2] The solution is to specify the init_priority attribute, to make the global/staic variables inititalize earlier than the contructors. [1]: https://stackoverflow.com/questions/43941159/global-static-variables-initialization-issue-with-attribute-constructor-i [2]: https://gcc.gnu.org/ml/gcc-patches/2017-03/msg00863.html Change-Id: I901a6a5cddec12aec9512fe58b16735fa2ad90d7 Signed-off-by: Lei YU <mine260309@gmail.com>
* Create libipmid and libipmid-hostWilliam A. Kennington III2019-02-075-5/+4
| | | | | | | | | | | | | | | | | | | This starts a transition to common ipmid libraries that providers can link against. It will allow for a cleaner separation between common ipmid functionality and daemon type specific code. This is needed so we can resolve all of the symbols in the providers at link time instead of discovering bad linkage by building and running a full ipmi daemon. In future commits libraries will be packaged for libipmid and libipmid-host which provide all of the symbols used by the current set of ipmid providers. This is the first step, it just separates and renames the headers. Legacy symlinks are still kept around for compatability. It also adds stub libraries so that external users can start linking as intended. Change-Id: I6bbd7a146362012d26812a7b039d1c4075862cbd Signed-off-by: William A. Kennington III <wak@google.com>
* IPMI channel to NIC device mapping modified within JSON config fileJohnathan Mantey2019-02-044-27/+72
| | | | | | | | | | | The IPMI to NIC channel mapping was done using a hard coded scheme. The scheme used generic channel names which were then mapped to specific device names. The hard coded generic to specific naming convention is removed, and the JSON file contains the device name directly. Change-Id: Ibc6821cae5a26f2666467aba5346d364053f2582 Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
* Move public variables to the class private space.Johnathan Mantey2019-02-041-4/+10
| | | | | | | | | | Moved two variables only used by the class into it's private variable space. Highlighted a method prototype that was buried within the variable list. Change-Id: Ie90d6b7db85ce1a9e445de87d612c41b4337d7fc Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
* Refactor the initialization of the channel data from the JSONJohnathan Mantey2019-02-042-60/+47
| | | | | | | | | | | | Copy the data retrieved from the JSON data files only after the contents of the two JSON configuration files have been read successfully. The code has also been changed to eliminate excess indentation in order to improve its readability and maintainability. Change-Id: I2def95b854bef39a9e7b196ef340c3a06965653a Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
* Eliminate public function returning pointer to private class dataJohnathan Mantey2019-02-042-36/+36
| | | | | | | | The getChannelDataPtr method breaks class encapsulation. Only class methods are supposed to have access to class private instance variables. Change-Id: I5dbfb75f0fa409b82a1e7f426b2034d39f7df9ad Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
* Update DBus initialization and useJohnathan Mantey2019-02-042-16/+7
| | | | | | | | The DBus instance variable is no longer a passed parameter to instance methods. Instance methods can access the private DBus variable directly. Change-Id: Id0c988802e5ad6c2757e7a243ee92331f447ac0d Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
* Use network interface name as channel nameRichard Marian Thomaiyar2019-02-023-66/+29
| | | | | | | | | | | | | | Use network interface name as channel name for the LAN channels. Mapper related to convert IPMI LAN reference to network interface is not needed anymore, and the same has been removed. Unit-test: verified ipmitool channel info for channel 1 & 2 and made sure it works fine as expected. Change-Id: Id87e2924a2a21a846507d6378b1b615000280f06 Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
* Fix: Return error for invalid privilegesRichard Marian Thomaiyar2019-02-021-6/+10
| | | | | | | | | | | | Return error code 0xCC for invalid privileges requested in SetChannelAccess command. Unit-Test: 1. Verified 0xCC is returned for command (reserved privilege) ipmitool raw 0x6 0x40 0x1 0x82 0x80 Change-Id: I3ea1ee6e02019ef0ae5f812e7d5dd999d710e4e7 Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
* Fix: Handle return codes for user commmandsRichard Marian Thomaiyar2019-02-021-8/+16
| | | | | | | | | | | Handle the missed return code for the user commands Unit-test: 1. Verified user list & error codes in ipmitool user list 1 Change-Id: Ia62aebc367dd2606df1dd25507953bf465ab40d7 Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
* Fix: Check reserved fields in channel cmds requestRichard Marian Thomaiyar2019-02-021-6/+6
| | | | | | | | | | | | Check reserved fields in channel cmds request and return 0xCC, if reserved fields are set Unit-Test: 1. Verified 0xCC is returned if reserved fields are set ipmitool raw 0x6 0x40 0x11 0x82 0x81 Change-Id: I4ca18c35d1435c6f9a636eb2c2730e63d8df319b Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
* Fix: NoAccess priv is tied with empty priv attrRichard Marian Thomaiyar2019-02-011-4/+0
| | | | | | | | | | | | | | SetUserAccess command must accept NoAccess privilege and update user-manager with empty privilege attribute for that user. Unit-test: verified it using following command, and access marked as NoAccess when queriying user list ipmitool raw 6 0x43 0x91 0x1 0x0f 0x00 Change-Id: Id63061edfc7777b7cb88c2cd7c693ea0b98c7949 Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
* Removal of excess 16 bytes paddingRichard Marian Thomaiyar2019-01-311-9/+1
| | | | | | | | | | | | | | | | | | | | | Cipher block padding is applied twice(once manually, and once through EVP_CipherFinal()) causing excess 16 bytes of data. Manual padding is removed to fix the issue. Unit-Test: 1. Verified that files are padded correctly without excess 16 bytes. Also, verified the password update and RMCP+ login using ipmitool ipmitool user set password <userid> <password> ipmitool -I lanplus -H 127.0.0.1 -U <userid> -P <password> raw 6 1 2. Also verified renaming of user name and login after that Resolves openbmc/openbmc#3463 Change-Id: Idec14b100bf7558137ff14601eb590b50cdbd7bf Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
* Return error for password length bit mismatchRichard Marian Thomaiyar2019-01-171-2/+7
| | | | | | | | | | | | | | | Return InvalidLength error, for password length bit mismatch for Set User Password command. i.e. if length is specified as 16 then accept only 16 byte charachers and for length specified as 20 accept 20 byte characters Unit-test: 1. Verified both by issuing proper 20 & 16 byte length filed 2. Also verified error sending 20 character byte by setting 16 byte length Change-Id: I1e6cca3b4dcd920e8e8dfcf23344c10d1bf37ca2 Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
* ipmid: channel: add max transfer size propertyVernon Mauery2019-01-114-0/+31
| | | | | | | | | Each channel can have a different maximum transfer size. This should be exposed so that it is easier to tell how many bytes it is possible to send or receive on a given channel. Change-Id: Ie277eb7a802edc1deeefe201a7560d371920f519 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* ipmid: use a common set of CXX flags across ipmid and provider librariesVernon Mauery2019-01-111-4/+13
| | | | | | | | | | | | | | | | This standardizes the set of CXX flags used to compile. This makes the file easier to read and ensures that all the libraries are all compiled with the same options as the executable. This also adds -Wno-psabi, which reduces the number of "Note:" messages when cross-compiling some STL stuff for ARM. See https://stackoverflow.com/questions/48149323/strange-gcc-warning-when-compiling-qt-project for details. Basically, gcc 6 and gcc 7 are not ABI compatible, but since the whole openbmc project uses the same compiler, we can safely ignore the informational notes. Change-Id: Idc343245404d0b471b7bec4462ac36c9477a7361 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* Change struct names to UpperCamelCaseRichard Marian Thomaiyar2018-12-222-18/+18
| | | | | | | | Change struct names to UpperCamelCase to align with OpenBMC coding guidelines Change-Id: Ib71768be45e57556a26b14b64adec98db3bc7762 Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
* libipmi: Decouple user commandsWilliam A. Kennington III2018-12-202-0/+2
| | | | | | | | | | | | | This makes them an optional, separate provider like the sysfs cmds. Tested: Ran on real hardware that included libusercmds.so in /usr/lib/host-ipmid and on a machine that did not include it. Ran ipmitool on the host to verify that the user commands were present when expected. Change-Id: I07b3af5ae603c3e5f1ea41f0afc309329f4e185d Signed-off-by: William A. Kennington III <wak@google.com>
* User commands updated to handle channel requestRichard Marian Thomaiyar2018-12-203-25/+9
| | | | | | | | | | | | | | | | User commands updated to handle channel request properly. 1. Self channel number 0xE will be converted properly as per the interfaces 2. Will handle commands to set / get access for session based channels only. Unit-test: Verfied get / set user access command works on self-channel and session based channels accordingly. 0xCC will returned for session-less channels Change-Id: I91f610e5a70ba648a90191b7aad6ae09d4e0acdc Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
* Channel commands updated to handle self channelRichard Marian Thomaiyar2018-12-191-6/+3
| | | | | | | | | | | | | Channel commands are updated to handle self channel number 0xE. When user request 0xE self channel number, it will be converted to proper channel based on the interface the command is requested. Unit-Test: Verified channel commands are working as expected. Change-Id: If542f8e88b609d7b92f4a96acb572611dd883555 Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
* Add self channel number conversion functionRichard Marian Thomaiyar2018-12-194-10/+24
| | | | | | | | | | | | | | | | Support for self channel number conversion added. This will be used by IPMI commands like GetUserAccess, GetChannelInfo etc. to query the details for the channel in which the command is requested. Self channel number 0xE will be converted to proper channel number by this function Unit-Test: Performed that commands received through ipmid channel are marked as channel 0xF and through netipmid as 0x1, when channel number 0xE is used Change-Id: I53820558faf4439d9909d52e4e98d71c38e714b4 Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
* Doxygen comments for enum & structureRichard Marian Thomaiyar2018-12-198-11/+132
| | | | | | | | | | | Added doxygen comments for enums & structures for user & channel layers. Unit-test: verified build. Change-Id: Ie5af8d6cdd4c04cb396869b7a3dc44f84efedd19 Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
* Refer SMS as regular KCS channelRichard Marian Thomaiyar2018-12-181-1/+1
| | | | | | | | | | | | | As per the default channel_config.json under phosphor-ipmi-config channel 0xF (KCS) is referred as SMS, and the same has to be used in the code. Unit test: Verifiy that when channel number 0xE is specified for KCS, it is getting converted to 0xF(SMS) as expected. Change-Id: I169d7b42f5ceed3bd46c84e9798b7a3f676b8604 Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
* Create / delete user with proper propertiesRichard Marian Thomaiyar2018-12-181-8/+2
| | | | | | | | | | | | | | Fixed code to create the user with default user properties and clean-up the properties properly, when the user name is cleared. Unit-Test: Verified that during Set User name, user is created with default properties and user info in ipmi is fully cleaned during user delete. Change-Id: I5060fc9f3dd1b98adb43fd7560a9e742ce484fcb Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
* ipmid: user_channel: fix include path for libuserlayerVernon Mauery2018-12-131-0/+1
| | | | | | | | | When built as a subdirectory, building in place works, but building with the source separate from the artifacts (a la Yocto) requires that the include path is set correctly. Change-Id: I0558814190e47b64b4bc504eed44d4a67ecdf156 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* make: Build user_channel separatelyWilliam A. Kennington III2018-12-131-0/+20
| | | | | | | | | | | We need to make sure that libuserlayer is installed before libipmi20 tries to install + relink. Otherwise the relink will fail causing the build to sometimes fail. We can only guarantee this ordering safely by using automake SUBDIRS since they are guaranteed to be executed in order. Change-Id: I6488eecb504f72273e97cfcf336e5bbd816c4137 Signed-off-by: William A. Kennington III <wak@google.com>
* SetUserName to return success - for same user nameRichard Marian Thomaiyar2018-12-131-2/+7
| | | | | | | | | | | | | | Updated code to return IPMI_CC_OK, if set user name is requested to update with the same name for the user id. Unit-Test: Verified set user name for same user id with same name succeeds twice Verified negative case too. ipmitool -I lanplus -H xx.xx.xx.xx -U root -P 0penBmc user set name 2 test ipmitool -I lanplus -H xx.xx.xx.xx -U root -P 0penBmc user set name 2 test Change-Id: I31c45a3f02ea5de535a27ddfd159b1b6fa4a4b1a Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
* Fix response length for Set user access commandRichard Marian Thomaiyar2018-12-121-0/+1
| | | | | | | | | | | Fixed set user access command to respond with completion code. Unit-Test: 1. Verified the response data for Set user access command issued in raw format and made sure that only completion code is returned. Change-Id: Iab3ea28ddd509e2ecc76a43c80bc7068e368c43e Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
* Update const uint8_t& to const uint8_tRichard Marian Thomaiyar2018-12-118-112/+107
| | | | | | | | | | | | | Update const uint8_t& to const uint8_t usage. Passing by reference for small types are costly than passing it by value and hence the change is done Unit-Test 1. Performed build and verified regular user account creation and RMCP+ login Change-Id: Ic2dd76795749148f82564677dde2a5db08520454 Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
* users: gcc8: fix stringop-truncation warningsBrad Bishop2018-11-281-4/+2
| | | | | | | | | | | | | | Avoid errors such as: | ../git/user_channel/user_mgmt.cpp: In member function 'ipmi_ret_t ipmi::UserAccess::setUserName(const uint8_t&, const char*)': | ../git/user_channel/user_mgmt.cpp:793:21: error: 'char* strncpy(char*, const char*, size_t)' specified bound 16 equals destination size [-Werror=stringop-truncation] | std::strncpy(reinterpret_cast<char*>(userInfo->userName), | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | userNameInChar, ipmiMaxUserName); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Change-Id: Ie6ceea49366dc3f3918f31dec3c792276c3a206f Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* std::variant: Fix new instances of mapbox specific callsWilliam A. Kennington III2018-11-262-11/+16
| | | | | | | | Tested: Build and run through unit tests. Change-Id: I87f2d5441b2f029e1e96ee1b46c4c760b0d82aac Signed-off-by: William A. Kennington III <wak@google.com>
* Add test & user enabled state in set user passwordRichard Marian Thomaiyar2018-11-206-11/+85
| | | | | | | | | | | | Support for test password and user enabled state in Set user password command Unit Test: 1. Performed user enabled & disabled and verified the state change 2. Performed test user password - both pass & fail condition Change-Id: I0eb91ad849e43072b1d9e90d777304fabdfb40bc Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
* Added suppport to convert self channel number.ssekar2018-11-202-0/+39
| | | | | | | | Define API for getting self channel number. Change-Id: I4027f580f30bd2ba84b11260f11f86eb8e9af1ff Signed-off-by: ssekar <suryakanth.sekar@intel.com> Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
OpenPOWER on IntegriCloud