summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* ipmid: replace std::experimental::optional with std::optionalVernon Mauery2019-01-112-10/+9
| | | | | | | | Now that the project is using c++17, std::optional can be used directly instead of via the std::experimental way. Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com> Change-Id: I7087f58bd3d9fd90b8b31e6902554351a3db2d0f
* ipmid: use a common set of CXX flags across ipmid and provider librariesVernon Mauery2019-01-112-25/+24
| | | | | | | | | | | | | | | | 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>
* Remove unused legacy code referencing org.openbmc.settings.HostTom Joseph2018-12-201-134/+0
| | | | | | | Resolves openbmc/phosphor-host-ipmid#115 Change-Id: Iab7f878b8b3011caa95f532f99062af9cbc1c33c Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* libipmi: Decouple user commandsWilliam A. Kennington III2018-12-206-10/+15
| | | | | | | | | | | | | 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>
* ipmi_fru_info_area: Pad output buffer.Oskar Senft2018-12-171-0/+17
| | | | | | | | | Always pad the output buffer to the maximum IPMI FRU size. This enables tools like ipmitool to write a new FRU blob with data longer than the original payload. Change-Id: Id6eb2c80504fb42ac72d7b643d186e9641a0832c Signed-off-by: Oskar Senft <osk@google.com>
* ipmi_fru_info_area: Add support for chassis typeOskar Senft2018-12-171-1/+21
| | | | | Change-Id: Ifd89fb37dc8515757d6014edeb028eb25e37bb95 Signed-off-by: Oskar Senft <osk@google.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-133-31/+28
| | | | | | | | | | | 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>
* gitignore: Ignore libraries regardless of directoryWilliam A. Kennington III2018-12-131-1/+4
| | | | | | | | | Currently our gitignore works becuase all of our libraries reside in the the top level directory and are named /lib*. We should really just be ignoring any file *.a *.so* or *.la. Change-Id: I6b48dc34819ac1798bbee5796dbe220c93db876e 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 units for fan RPM sensorKirill Pakhomov2018-12-122-3/+2
| | | | | | | | | Use actual RPM unit type code from IPMI specification instead of revolutions type code coupled with per minute bit, which is also unused in most ipmi client implementations. Change-Id: If42900950a21f5526e890aef0dd6822e4e54c6e3 Signed-off-by: Kirill Pakhomov <k.pakhomov@yadro.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>
* configure: Fix literal usage in AS_IFWilliam A. Kennington III2018-12-111-3/+3
| | | | | | | | We need to make all of the contents of AS_IF literal so that they are not re-interpreted by autoconf. Change-Id: I220fa6254a16d1f59e0400a9fb1ca909a9e7befb Signed-off-by: William A. Kennington III <wak@google.com>
* build: fix pam library inclusion and usagePatrick Venture2018-12-112-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The pam_misc was deliberately included by the Makefile_am, however, no calls into pam_ were made from libuserlayer. Pam calls were made from usercommand.cpp, in libipmi20.so. The calls are part of the primary pam library. Before: objdump -t phosphor-host-ipmid/.libs/libipmi20.so\ |grep "UND"|grep -v "@@"|grep "pam" 0000000000000000 *UND* 0000000000000000 pam_end 0000000000000000 *UND* 0000000000000000 pam_chauthtok 0000000000000000 *UND* 0000000000000000 pam_start Now: objdump -t ./.libs/libipmi20.so|grep "UND"|grep pam 0000000000000000 F *UND* 0000000000000000 pam_chauthtok@@LIBPAM_1.0 0000000000000000 F *UND* 0000000000000000 pam_end@@LIBPAM_1.0 0000000000000000 F *UND* 0000000000000000 pam_start@@LIBPAM_1.0 Tested: Searched objects for undefined pam calls and found the information above. Change-Id: I44aa570a2087affafba09886fbf17fa9d99abe05 Signed-off-by: Patrick Venture <venture@google.com>
* build: drop linking of libsslPatrick Venture2018-12-111-1/+2
| | | | | | | Drop unused linking of libssl from build. Change-Id: I8cb0e6d66f4529fc64aa5329798c5d95af7068b5 Signed-off-by: Patrick Venture <venture@google.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>
* Implement set chassis capabilities IPMI commandsYong Li2018-12-113-26/+185
| | | | | | | | | | | | Create a new dbus interface for the chassis capabilities, and store the chassis capabilities using phosphor settings manager Tested By: ipmitool -H $BMCIP -U root -P 0penBmc -I lanplus raw 0 5 0 2 4 6 8 0xa ipmitool -H $BMCIP -U root -P 0penBmc -I lanplus raw 0 0 Change-Id: Id01555358adfec3814fd03b3e6d422916c861039 Signed-off-by: Yong Li <yong.b.li@linux.intel.com>
* ipmid: host-cmd-manager to use default event source for timersVernon Mauery2018-12-103-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | The sdbusplus/timer.hpp class can be passed an event, but by default, it just uses the default system event queue. This updates the host-cmd-manager Manager class to use the defaults. Tested-by: Send the heartbeat command with the host powered off and watch for a timeout message: dbus-send --print-reply --system \ --dest=xyz.openbmc_project.Ipmi.Host \ /xyz/openbmc_project/control/host0 \ xyz.openbmc_project.Control.Host.Execute \ string:"xyz.openbmc_project.Control.Host.Command.Heartbeat" Watch the log (journalctl -f): Nov 27 00:34:52 wolfpass ipmid[1255]: Pushing cmd on to queue Nov 27 00:34:52 wolfpass ipmid[1255]: Pushing cmd on to queue Nov 27 00:34:52 wolfpass ipmid[1255]: Asserting SMS Attention Nov 27 00:34:52 wolfpass ipmid[1255]: SMS Attention asserted Nov 27 00:35:23 wolfpass ipmid[1255]: Host control timeout hit! Change-Id: I904d34b67050723a9c7e405bda4e02f1a9cb4dbd Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* build: Fix Makefile_am: drop LIBPAMPatrick Venture2018-12-031-1/+1
| | | | | | | Drop LIBPAM because it is undefined. Change-Id: Ibcf4ee8b20b7d74f9641b63b2fab6da8fb43c689 Signed-off-by: Patrick Venture <venture@google.com>
* build: Fix crypto reference in Makefile_amPatrick Venture2018-12-031-1/+1
| | | | | | | Use CRYPTO_LIBS, as LIBCRYPT is undefined. Change-Id: I603ec51067bb2bf5e9d030b9e6ff02dbbabae8f8 Signed-off-by: Patrick Venture <venture@google.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>
* ipmid: Use sd_event_loop()Andrew Jeffery2018-11-271-11/+1
| | | | | | | | | | The infinite for-loop over sd_event_run() is effectively the implementation of sd_event_loop(). sd_event_loop() has the additional features of terminating correctly and running exit tasks on sd_event_exit(). Change-Id: Ib01a9b1e43891cbb65cfcab1c7a000d2a13728de Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* storage: gcc8: standardize use of std::filesystemBrad Bishop2018-11-271-1/+1
| | | | | | | | | | | | This was already done repo-wide with 185b9f8b but this one spot appears to have been missed, and was caught by gcc8: | ../git/storagehandler.cpp:276:39: error: 'filesystem' is not a namespace-name | namespace fs = std::experimental::filesystem; | ^~~~~~~~~~ Change-Id: I79d70f0ba1268eae9fc76be690313a5128b59f17 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* gitignore: add all *.lo files to ignore listPatrick Venture2018-11-261-1/+1
| | | | | | | | Specify all *.lo files and not just /app/*.lo to handle the objects built into other directories. Change-Id: I01df38ef81f749913dc9d536ffdcc2774d17b785 Signed-off-by: Patrick Venture <venture@google.com>
* transporthandler: LanParam enum -> enum classWilliam A. Kennington III2018-11-262-38/+39
| | | | | | | | | | | We should be using enum classes instead of enums to avoid poluting the global scope. Tested: Built and run through unit tests. Change-Id: Iec72f04b5cbf91814d0055c670bcc509eb30a821 Signed-off-by: William A. Kennington III <wak@google.com>
* transporthandler: Use switch when applicableWilliam A. Kennington III2018-11-261-77/+90
| | | | | | | | Tested: Build and run through unit tests. Change-Id: Id86f7f368f1c1e78b7f764d53231e8d0d51ad02f Signed-off-by: William A. Kennington III <wak@google.com>
* transporthandler: Convert ints to enumWilliam A. Kennington III2018-11-261-11/+14
| | | | | | | | | | | | We want to be able to identify unique LanParams for each of the different sub-queries. These make more semantic sense as an enum than individual ints. Tested: Built and run through unit test suite. Change-Id: Ieb304f2f866215776e8d3e264b07ea110c639efc Signed-off-by: William A. Kennington III <wak@google.com>
* std::variant: Fix new instances of mapbox specific callsWilliam A. Kennington III2018-11-263-13/+18
| | | | | | | | Tested: Build and run through unit tests. Change-Id: I87f2d5441b2f029e1e96ee1b46c4c760b0d82aac Signed-off-by: William A. Kennington III <wak@google.com>
* dcmihandler: use visitor to pull sensor valuesJames Feist2018-11-211-18/+13
| | | | | | | This will help upgrade us to using doubles in the future. Change-Id: I94bb26fc43ae410a15402b4966e135d847a1fa33 Signed-off-by: James Feist <james.feist@linux.intel.com>
* makefile cleanupPatrick Venture2018-11-202-51/+75
| | | | | | | | Cleanup the Makefile.am files to be consistent. Space indentation was replaced with tabs, and newlines consistently injected. Change-Id: I5a5e343d6a3e9a7a65eae9827a61fcdd4fc33878 Signed-off-by: Patrick Venture <venture@google.com>
* move HOST_IPMI_LIB_PATH to configure.acPatrick Venture2018-11-203-2/+7
| | | | | | | | Per TODO in Makefile.am, move the definition of HOST_IPMI_LIB_PATH from the Makefile to the configure script. Change-Id: If39bf1193f4502c239a78e21487566b234b746f8 Signed-off-by: Patrick Venture <venture@google.com>
* gitignore: add coverage and test generated filesPatrick Venture2018-11-201-3/+10
| | | | | | | Add coverage and test generated files to gitignore file. Change-Id: I72d56567ea3bcadae6731070c7c1265b92d05a9b Signed-off-by: Patrick Venture <venture@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>
* Synchronize channel info between network and ipmiAppaRao Puli2018-11-202-19/+464
| | | | | | | | | | | | | | | | | | | Synchronizing the channel privilege config between network interface(generic) and channel managament(IPMI). 1) During start-up get the network interface privilege and update the IPMI data base(NV). 2) Catch the signal for network interface channel privilege and update the ipmi data base(Volatile and NV data). 3) During ipmi privilege update(NV), send it to network interface over DBUS. Unit Test: Verified the changes by modifying MaxPrivilege in network interfaces and signal catching logic and vise versa as specified in description. Change-Id: Iaa7e9e248f1cac6ab560137c8c136abdd44e190e Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com> Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
* IPMI Channel commands implementationAppaRao Puli2018-11-208-2/+2205
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IPMI Channel commands implemenation - squashed commit e9a75d8dd6e89d17381f0310c7930586c6b79996 Author: AppaRao Puli <apparao.puli@intel.com> Date: Thu Jul 5 14:47:22 2018 +0530 Channel layer separation De-coupling the channel management from ipmi channel commands implementation. This gives flexibility to load only needed stuff in different modules(host-ipmi or netipmid) Change-Id: Ib334562beb9325f7768ed6a15475cae15af17b19 Signed-off-by: AppaRao Puli <apparao.puli@intel.com> Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com> commit 726ddf2af678ea6773f4b4b918fbd49be8c83e6a Author: AppaRao Puli <apparao.puli@intel.com> Date: Thu May 24 16:45:30 2018 +0530 IPMI Channel commands implementation Following IPMI channel commands are implemented. 1) Set channel access (0x40) 2) Get channel access (0x41) 3) Get channel info (0x42) Also added code supported for LAN configuration parameters 1) Authentication Type Support (selector #1) 2) Authentication Type Enables (selector #2) Change-Id: Ic4156378c7756eca383dc3da52114fd119346ca6 Signed-off-by: AppaRao Puli <apparao.puli@intel.com> Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com> Change-Id: Ic4156378c7756eca383dc3da52114fd119346ca6 Signed-off-by: AppaRao Puli <apparao.puli@intel.com> Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
* Add kcs selfchannel support & define for LAN toossekar2018-11-202-0/+22
| | | | | | | | | | Define sudo API's for returning channel index for self channel. At moment, This API returns KCS for host-ipmi Change-Id: Icefd5d949e94d4399adaffdad102ccb18c1b7cdc Signed-off-by: ssekar <suryakanth.sekar@intel.com> Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
* Implement IPMI ACPI set/get commandsYong Li2018-11-203-1/+266
| | | | | | | | | | | | | | | | | | | | | | | The IPMI ACPI set/get power state commands are provided to allow system software to tell a controller the present ACPI power state of the system. This is an independent setting that may not necessarily match the actual power state of the system. The commands are used to enable the reporting of the power state, it does not control or change the power state. The ACPI status will be saved into flash by settings manager. Tested By: Set ACPI: ipmitool -H <IP> -P 0penBmc -I lanplus raw 0x06 0x06 0x86 0x83 Get ACPI: ipmitool -H <IP> -P 0penBmc -I lanplus raw 0x06 0x07 Change-Id: I6d00c0aec931b98d6691d7c4a54698e08d317aa4 Signed-off-by: Yong Li <yong.b.li@linux.intel.com>
* ipmid: use the default system busVernon Mauery2018-11-201-1/+1
| | | | | | | | | | The documentation says sd_bus_default_system() is preferred over sd_bus_open_system() because all the calls to sd_bus_default_system() will use the same resources, whereas the sd_bus_open_system() will create a new connection and consume more resources for every call. Change-Id: I0206a43eb2a8dd7c76b8246c9f9640a95b2e473c Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* Basic IPMI User Management SupportRichard Marian Thomaiyar2018-11-208-7/+2361
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Squashed commit containing Basic User Management implementation Unit Test: 1. Verified both Host & NetIpmid works fine. 2. Verified user related command responses commit b46b869c0a3958a572b976b3bbaf6b5f33673778 Author: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com> Date: Tue Aug 7 15:30:32 2018 +0530 Fix static objects to directly link user layer User layer library has to be directly linked with netipmid in order to be used in RAKP commands. Hence user layer library should not initialize the static bus objects in file scope, as ipmid_get_sd_bus_connection() won't be available during this time. Hence moved it under function scope and initialize it later. Unit test: Made sure, with this change it is loaded perfectly under phosphor-ipmi-host & phosphor-ipmi-net and responding to all user commands Change-Id: Id3f2e06580ca41b0347176ca33e011bf7b048c6a Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com> commit dc60516c45234379a30ad8b03b1cbe53978faeae Author: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com> Date: Tue Aug 7 15:22:37 2018 +0530 Fix to use proper user index for set user name Fix to use proper user index, instead of bailing out on first empty index. If user creation is requested on random index with previous index empty, then signal handler updates the data in first empty index, instead of traversing the user list fully. Fix added to mark the first free index, and still search for match to skip if found. Unit Test: Verified that user added in random index shows in that index using ipmitool set user name command. Change-Id: I30d9b884a5bae98b243ccf8ba7da194ef81355e6 Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com> commit 0b9a81a1261b08ea13ad8777d0d80dad937e9972 Author: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com> Date: Fri Jul 6 15:57:02 2018 +0530 Converting json store to array for user config Addressed comments to convert to array instead of key value pair. Testing: Performed basic testing of user management commands in both host & netipmid, by repeatedly restarting the same. Change-Id: I2e51ded3e2299fa196d868213950d96c72886358 Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com> commit 182c945657b29acaeb13fc44129e0ed929013e59 Author: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com> Date: Sat Jun 30 00:07:28 2018 +0530 Fix D-Bus paths for user management Fix D-Bus path as per upstream code in user management Change-Id: Idb22bee4365520f3d58e70ff61b02d6f6512d707 Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com> commit cd5e22b16f8805dda396311b06994a9e021e97e9 Author: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com> Date: Thu Jun 28 06:22:27 2018 +0530 Json format to store user config & cleanup Code updated to use json format to store and read the user configuration data. Few basic cleanup's performed. Change-Id: I7005f4f2648ccb8214312982a755ddcc6c33e64d Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com> commit 95ca9a67a4b84df603db0eb6a7024e9e0e5ad342 Author: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com> Date: Wed May 30 15:16:47 2018 +0530 Get & Set User Access command implementation Get & Set User access command implementation Change-Id: I4f7a86de95400387c47ae556127baa1f02a703b2 Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com> commit b2dea762362d06b70576dba5f45552d548792cb9 Author: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com> Date: Fri May 18 23:46:23 2018 +0530 User layer separation. Separated out user commands from the implementation details, by creating user layers. App Handler library and netipmid will directly rely on this user_layer.so Change-Id: Ie7d4b3a5a934e32da73e066a25da4c27485c59c8 Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com> commit 63e3113e522ecc7ce6e5aa1c85de4dc9b9a65a7b Author: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com> Date: Mon May 7 12:00:06 2018 +0530 Updated user management ipmi support 1. Relying on Object Manager & D-Bus properties signal (except user rename, for which still relying on user rename signal) 2. Minor clean-up. Change-Id: I594e7823a2c626bb7c88ec54a3ffa89a60b09c65 Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com> commit 3e7b774c842917743369569790612d74387c755e Author: AppaRao Puli <apparao.puli@intel.com> Date: Tue Apr 24 22:01:15 2018 +0530 Synchronize user manager data during ipmi startup Synchronizing the user information by reading all managed user objects from dbus and checking ipmi user data for any update/delete/add users. Change-Id: I9e1a62ec9dd186a7276d083a57e679606d635e05 Signed-off-by: AppaRao Puli <apparao.puli@intel.com> Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com> commit 92298ac0f591d167b0e26b977316a2b136127778 Author: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com> Date: Tue Apr 24 21:34:08 2018 +0530 Minor fix: Read user enabled state in signals Fixed to read user enabled state in signal handlers. Change-Id: I0aa6c4687c16e08d8e304315e85cb65e9dbd346a Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com> commit 8646d2683fc247ce02a0460f9577276eb6e0a581 Author: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com> Date: Wed Apr 11 22:18:44 2018 +0530 Signal handler update Support added to handle group, privilege user rename, enable / disable signal, and update the database accordingly. Change-Id: Ia33d063715a35814bbe1f9220e9609b800261e33 Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com> commit fa411b2c4bbef50175b084889a4829206263ebdb Author: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com> Date: Mon Mar 12 23:42:34 2018 +0530 Add Basic user manager support - IPMI Add basic user manager support in IPMI Creates user through D-Bus user interface and sets password using pam_chauthok(). Lock & File reload mechanism also implmeneted. UserUpdate signal handler support added to update user in IPMI, when users are updated through different interfaces. Change-Id: I1adc538562615109189d7c19dadae0b6a109f4a5 Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com> Change-Id: I1adc538562615109189d7c19dadae0b6a109f4a5 Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
* host-ipmid: add more ipmi error codesPatrick Venture2018-11-181-0/+4
| | | | | | | Add more IPMI error codes to header for use by ipmi handlers. Change-Id: Iceef9cabcb07ad67024275fd15e886706ba7698d Signed-off-by: Patrick Venture <venture@google.com>
* IPMI password entry cleanupRichard Marian Thomaiyar2018-11-134-13/+55
| | | | | | | | | | Whenever user is removed from the system, password map in IPMI database has to be cleaned up. Similarly password entry must be updated when user rename happens. This commit add's API changes for the same Change-Id: I304c721b31fc7fbad019c85d8ca2ecc60ca398d8 Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
* Handling delete password entry from ipmi-passAppaRao Puli2018-11-135-76/+518
| | | | | | | | | | API to Handle the delete password entry from ipmi-pass encrypted file when user gets deleted by any interface Change-Id: I692a81b166b53d6fc981fdb85ce5d6980887560b Signed-off-by: AppaRao Puli <apparao.puli@intel.com> Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
OpenPOWER on IntegriCloud