| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
According to section 6.6 Power management of DCMI specification,
if power management feature is disabled,
the related commands (Get/Set/Activate/Deactive Power Limit)
should be unsupported.
Change-Id: I887f33babb2fe7a1ab97bb2d0720a693171e48a1
Signed-off-by: Kirill Pakhomov <k.pakhomov@yadro.com>
|
|
|
|
|
|
|
|
| |
Pass JSON config file name as a parameter
to make parser re-usable with various config files.
Change-Id: I5bf1e91121e0e75be58383151f265b32f39a5b60
Signed-off-by: Kirill Pakhomov <k.pakhomov@yadro.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
This is a fix for 40f59e2c50572705496ae743577f124f24afd77e.
Change-Id: I850f87968600759c2758841803ebd23c0856319d
Signed-off-by: Oskar Senft <osk@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This command is used for logging SEL.
Tested:
1. test with netipmid and ipmid.
2. test pass with good parameter
ipmitool raw 0x4 0x2 0x20 0x11 0x04 0x11 0x80 0xc0 0x10 0xFF
ipmitool raw 0x4 0x2 0x20 0x11 0x04 0x11 0x00 0x30 0x10 0xab
3. test pass with bad parameter (expect invalid data length error)
ipmitool raw 0x4 0x2 0x20 0x11 0x04 0x11 0x00 0x30
ipmitool raw 0x4 0x2 0x20 0x11 0x04 0x11 0x00 0x30 0x11
ipmitool raw 0x4 0x2 0x20 0x11 0x04 0x11 0x00 0xc0
ipmitool raw 0x4 0x2 0x20 0x11 0x04 0x11 0x00
Change-Id: I7d51aac8fee2edb1faeb91f4c96a033736068779
Signed-off-by: Jia, Chunhui <chunhui.jia@linux.intel.com>
|
|
|
|
|
| |
Change-Id: I5392202352c2baa70d61768cbaef9eb0e1faad56
Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changes adds a data length check to all supported IPMI
SEL commands. This prevents a command from being handled when
too much data is provided in the request.
Tested: Ran Get SEL Info, Reserve SEL, Get SEL Entry, Add SEL Entry
Delete SEL Entry, Clear SEL, Get SEL Time, Set SEL Time, with and
without an extra byte. Without the extra byte, the commands returned
normally; with the extra byte, a 0xC7 is returned indicating that the
request data length is invalid.
Change-Id: Icdd7db80f1bced3e6efddb5c5655e9f44a4e0e3b
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
|
|
|
|
|
|
|
|
| |
The functionality provided by net.hpp and net.cpp has been moved into
the channel_mgmt class.
Change-Id: I4820609f87f27ebe81d9b36f7b8e95a5262985ac
Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
IPMI Spec Section 19.2:
Unless otherwise noted, Reserved bits and fields in commands(request messages)
and responses shall be written as '0'.
Return "out of range" error for unsupported power policy
and also return the supported policies on success.
Change-Id: I51d63b86ef0d3076438649abc49c63267c57cbd5
Signed-off-by: Yong Li <yong.b.li@linux.intel.com>
|
|
|
|
|
|
|
| |
The netmask value was not being pulled from the correct DBus path.
Change-Id: I4b163d5269737f7a9556d7b5ceafa25a5034d327
Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 54fad6de0541c2f98e9b511f1d30bbcbcd743db6.
This commit is reverted because the mapping of D-Bus object path to
sensor information is still needed. The mapping is needed to serve
the SEL commands which translate D-Bus logging objects to SEL entries.
Change-Id: I2505299671db1f0bd7f116ef0e2ca4a0273eead8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
Add the IPV6 LAN parameters to the enum. These commands are not yet
supported.
Change-Id: I9847fe7c70ef66a2f0138ba79651376c011a2273
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|