| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Change-Id: Ia9815102064d20795a44b8e6a7d8b324c280756c
Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implemented Get channel cipher suite command to list
the supported algorithms. Previously this command supported only
list by cipher suite.
Unit test:
Verified that algorithms are listed for both byte3 bit7 set / un-set
ipmitool raw 0x6 0x54 0x1 0x0 0x80
ipmitool raw 0x6 0x54 0x1 0x0 0x00
both listed alogrithms as expected
Change-Id: I7b0ac74293cce869f5bcaa3c5ec226e1d237ccdf
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 UpperCamelCase to align with
OpenBMC coding guidelines
Change-Id: Ib71768be45e57556a26b14b64adec98db3bc7762
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
|
|
|
|
|
|
|
| |
Resolves openbmc/phosphor-host-ipmid#115
Change-Id: Iab7f878b8b3011caa95f532f99062af9cbc1c33c
Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 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 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Change-Id: Ifd89fb37dc8515757d6014edeb028eb25e37bb95
Signed-off-by: Oskar Senft <osk@google.com>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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_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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
Drop LIBPAM because it is undefined.
Change-Id: Ibcf4ee8b20b7d74f9641b63b2fab6da8fb43c689
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
| |
Use CRYPTO_LIBS, as LIBCRYPT is undefined.
Change-Id: I603ec51067bb2bf5e9d030b9e6ff02dbbabae8f8
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
Tested:
Build and run through unit tests.
Change-Id: Id86f7f368f1c1e78b7f764d53231e8d0d51ad02f
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
Tested:
Build and run through unit tests.
Change-Id: I87f2d5441b2f029e1e96ee1b46c4c760b0d82aac
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
| |
This will help upgrade us to using doubles in the future.
Change-Id: I94bb26fc43ae410a15402b4966e135d847a1fa33
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
Add coverage and test generated files to gitignore file.
Change-Id: I72d56567ea3bcadae6731070c7c1265b92d05a9b
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|