| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
RestrictionMode PropertiesChanged signal handler is fixed to
read the property list correctly, and use the same. Bug was
causing ipmid to crash when RestrictionMode property was
updated
Tested:
Verfied that ipmid didn't crash and updates the filed, when
RestrictionMode property is updated.
Change-Id: I33ff977b2d06d96a9591a9d650a8b76b3119b1fe
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
When building with SDK, the compiler complains about
’variant’ being not a member of ’std’:
.../pack.hpp:249:24: error: ‘variant’ is not a member of ‘std’
This commit adds appropriate #include to fix that.
Change-Id: I99d6b7c17cbe1f49d706821797cf3fa03ca8c26a
Signed-off-by: Alexander Amelkin <a.amelkin@yadro.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The code coverage macros from the archive changed in a backward
incompatible way. This adds a workaround to autodetect either version
and do the right thing.
Tested:
Against the typical, older autotools and the new autotools
2019.01.09 in the CI environment.
Change-Id: I765ec46051c2666874dce51675092aa4da989ec5
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's UB to shift an integer by the size of that integer. More
specifically, if you disable compiler optimization and try and unpack a
32 bit bitset you will end up with a 0x0 mask. Avoid UB by replacing
shift subtract with a negate shift.
Tested:
Unit tests pass now.
Change-Id: I03a6f866a51c955b57787d641da9180841747e4c
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Modify to use the new provider API. One by one, change calls to
remove any legacy API constructs.
Tested-by: ipmitool mc watchdog get
ipmitool mc watchdog off
ipmitool mc watchdog reset
Change-Id: If6cd1d921908dc7f5462e99b0098b4897e743ebb
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
| |
The Get Device ID rewrite went in before some feedback had come along to
add helper return functions for more readable error codes.
Tested-by: Built and runs Get Device ID as before.
Change-Id: I7e31ad3cff75acb11bda5ee06f60429552a61ed5
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Modify to use the new provider API. One by one, change calls to
remove any legacy API constructs.
Tested-by: ipmitool chassis identify
ipmitool chassis identify 0
ipmitool chassis identify force
Change-Id: I91bc21fdaef74eb32f297e0fa54edbc2e1bf4c2b
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
At the top level, payload had the ability to pack a tuple, but it did it
by splitting it into its parts and packing those individually. But if
one of those parts was a tuple, it would fail. This moves the tuple
packing code into the packing templates so that it is possible to pack a
nested tuple of tuples.
Tested-by: newly written tuple unit tests pass
Change-Id: Icd80926314072df78b0083a823dcfb46e944e365
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Because the base template actually handles things (all integer types),
it needs to ward off non-integer types in a clear way, rather than
relying on the user seeing that a tuple doesn't have an operator <<(),
for example. This provides a clear message if a specialized pack
operation was not hit.
Tested-by: attempted to build with a non-supported pack type
Change-Id: I66280831e88b4eac903b89f523e5f1a56a53cf9d
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Most IPMI commands have some error response. This makes it more
intuitive what is happening, changing
return ipmi::response(cc::CommandNotAvailable);
to
return ipmi::responseCommandNotAvailable();
which is parallel to the success respones of:
return ipmi::responseSuccess();
Change-Id: Ibbd401c4007a02e91ab4983814b920d6d7f02404
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
Tested-by: ipmitool raw 6 0x88
-> returns c1
Change-Id: I1f22a70d135ed0ab39c6b1fbacf41e8d5ff20b65
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Modify to use the new provider API. One by one, change calls to
remove any legacy API constructs.
Tested-by: ipmitool raw 6 0x36
01 3f 3f 0a 01
Change-Id: I9be3d21c041ba1d99f6672c4501faafcca117d11
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Modify to use the new provider API. One by one, change calls to
remove any legacy API constructs.
Tested-by: ipmitool raw 6 4
56 00
Change-Id: I3cf0a9bd93df6b12584861b4c60b272ff84b7dae
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Modify to use the new provider API. One by one, change calls to remove
any legacy API constructs.
Tested-by: ipmitool raw 6 1
check for expected output
Change-Id: I59688627eb32670559c1defad0b7af8abeb84c75
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
When requesting a Request or Context object as part of the handler
signature, it should be a std::shared_ptr<ipmi::Context> or
std::shared_ptr<ipmi:message::Request>. There was a bug that made it so
it was not possible to have either of those in the signature. This
commit enables both.
Change-Id: Ib52000f643d7b5f21bc4022629e7d7b03a524dc1
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Some commands have optional return values. This allows the handlers to
be defined as returning an optional<T> value and then in the body of the
handler set the value in the optional or not.
Tested-by: unit test runs successfully
Change-Id: Ib38a4589609fb1eb192106e511c9ee3a507ac42f
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Add variant support to allow return of mutliple specific
types. Also change types to const as this is required by
the visitor and these could have been const all along.
Tested: Added unit test and used in oem provider
Change-Id: I5cb056c15d4813b9eee58eecb707664477d019d9
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
|
| |
Missing the correct exception was causing issues with setting the IPV4
address
Change-Id: Ieaaacfcbaec82a0c3b110889817a7ceb9cda8d3c
Signed-off-by: Dave Cobbley <david.j.cobbley@linux.intel.com>
Signed-off-by: Yong Li <yong.b.li@linux.intel.com>
|
|
|
|
|
|
|
| |
Remove the "" style includes in preference of the <> style
Change-Id: I74bfa4dcadeaca7fe2341d5a9221844ebe2653b8
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
| |
New channel commands have been implemented in user_channel/channelcommands.cpp
This removes the old, unused command implementation
Change-Id: I054ea053d25865e0d4203f2ae294778d31817637
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
| |
These two files have now been replaced with newer APIs and can be removed.
Change-Id: If60227b24188c6796211ca43379169f9a95c9cb3
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow individual parameter changes to take effect based
on timer. i.e. setting any one LAN parameter change will take
effect even without Set In Progress parameter update
Verification:
Verified lan settings change to static alone using ipmitool lan
and manually issued parameter update without SET_IN_PROGRESS
change.
Change-Id: I2a9f8e8ef94ecb23da8bac38a6b49249544e8975
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
|
|
|
|
|
|
|
| |
Installs into bin instead of sbin per guidelines.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: If171989d2c0c6a53d9368b776ac98dea743057da
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
DCMI uses the group oem extension 0xdc. The legacy registration
allowed for registering with the group extension netfn and did nothing
with the actual group extension ID. This change makes the assumption
that all legacy group extension registrations are dcmi and registers
them as such with the new group handler machinery.
Tested-by: Run ipmitool dcmi discover and see it show information
Change-Id: I862ba212a7fe2e2dad83d6c9f22e7d1a48b7d406
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
| |
Historically, the provider libraries and symlinks to them were
installed in the /usr/lib/ipmid-providers directory. This can cause
ipmid to attempt to load each one twice. This change will make it
so ipmid will not load symlinks, but only real files.
Change-Id: I1353f01d509ef495bfa666eed97b034d73a1a90a
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
| |
In order to be compatible with older versions of GCC that did not have
the experimental filesystem moved over to the standard paths, the code
would splice the experimental code into the std namespace. This is no
longer necessary with yocto 2.6 and the latest versions of GCC.
Change-Id: I2db13c52a91456318795819f2d45c3386b4c56d2
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
Delete obsolete scripts/writechannel.mako.cpp
Change-Id: I79dac382132bf89877f2718d1b6219a2503e415e
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Get DCMI Capabilities (Discover) command returned
wrong values for parameters exceeding 1 byte length.
Also added the check for SEL entries number range
per DCMI specification.
Tested: the condition for value limit check works properly.
Change-Id: Iee0d75594067630bb6094d05533c87e3ad82807e
Signed-off-by: Kirill Pakhomov <k.pakhomov@yadro.com>
|
|
|
|
|
|
|
|
|
|
| |
types.hpp is required by utility.hpp, which is exported, so it needs to
be exported as well. This moves it to the include/libipmid directory,
changes the Makefile to export it, and changes all the files that
include it so it can be found in the right place.
Change-Id: I30ec365446e4de466c266ec4faa327478460ec05
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These are functions that are used widely by ipmid providers, so it makes
sense to put them in libipmi.so (the library that all providers must
link against).
Tested-by: use nm to inspect the binaries to see that the symbols are in
the expected library.
arm-openbmc-linux-gnueabi-nm libipmid.so.0.0.0 \
| grep getDbusObject
0001063c T _ZN4ipmi13getDbusObjectERN9sdbusplus....
Change-Id: I1221f807f2711c5301c5574623564ea1ae48a437
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
| |
handles is a poor name choice for the list of IpmiProviders and being
declared as an auto is hard to see what type it really is. This changes
the type to be fixed and uses a more appropriate name for the variable.
Change-Id: I35f744c491f3810c7381738516b8ff0a6f20f129
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
This part was originally omitted, but needed by some external provider
libraries. This will more closely mimic the behavior of ipmid prior to
the architecture update.
Change-Id: I5db35222e268a117480285c700d88206d6505d92
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On some systems ipmid was not responding to SIGTERM so systemd
could not shut it down in a clean manner, resorting to SIGKILL
after a long timeout. This adds code to respond to SIGTERM and
SIGINT and safely unwind all the provider libraries on exit.
Tested-by: running ipmid; in another shell, and running
'killall -15 ipmid' or 'killall -2 ipmid' to send
SIGTERM or SIGINT and watch that ipmid shuts down
in a controlled and timely manner.
Change-Id: I690846796523bebea1a08845c0d17e1df2a94fee
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows providers or the main application to handle POSIX signals
using a callback chain. Each handler can return continueExecution or
breakExecution to stop the signal handling chain or allow it to
continue. Each handler is registered with a priority and upon reciept of
a signal, each handler is executed in priority order until the end of
the list is reached or one returns with breakExecution.
Change-Id: Idd83625eb1a2d3bdafc92bdd839e0d6386177ff2
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
| |
Change-Id: Iafe6827fa545d72666994bb68b5972cde4d0a1ff
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ipmid_get_sdbus_plus_handler() was re-added to be a part of
systemintfcmds where it was used. This moves it to libipmid.so
because that is where symbols used by both ipmid and the providers
should be.
Because ipmid_get_sdbus_plus_handler() relies on the io service and the
main sdbus::asio::connection is also right there, this moves those
symbols to libipmid as well to keep coherent.
Change-Id: Ib125a0c217c8bcf47a8a4bd0c557eb69e928245b
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Until the response goes back out onto D-Bus, the completion code is held
in a separate part of the Response object. The D-Bus response has a
separate field for the completion code as well, reserving a byte array
for response data only.
This fixes the ipmitool error message 'Bad response length, len=1' when
it attempts to query the PICMG capabilities.
Change-Id: Iff0c3cb2e46a20e52229265eebb0995878a41714
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Directly calling unpack from the Request interface will attempt to
unpack the whole message, resulting in a 0xC7 response if the whole
message was not unpacked. Since at this point in the execution, the
point is to only extract the group ID or the IANA, the lower-level
Payload unpack interface must be used. This allows for partial unpacks
and only returns error if there are not enough bytes to unpack.
Change-Id: Ie18377597e925eff89c9b7c1a6d2258627d5f240
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the timeout param is not specified in a sdbus call, the default value
of 25s is used, if not configured in the systemd configuration file.
It turns out this timeout is too long than ideal, since the other pieces
in the IPMI stack have much smaller timeout values. For example, the
BTbridge/KCSbridge has a timeout of 5s. It is unnecessary to let ipmid
getting blocked on waiting for D-Bus replies.
This commit changes the timeout to 5 seconds on D-Bus get/set properties,
mainly because these calls are the majority of sensor read/writes which
are most subject to operation timeouts. The other D-Bus operations might
be called for object/service discovering, which might be a one-time
startup procedure.
Resolves: openbmc/openbmc#3494
Signed-off-by: Kun Yi <kunyi731@gmail.com>
Change-Id: I5a55a8eb872b1ebe8730c673231be5037d24fc0b
|
|
|
|
|
|
|
|
|
|
|
| |
The whitelist RestrictionMode lookup was missing the interface name on
the properties get method call. This is a fixup for that.
Tested-by: watch ipmid startup and see that it does not complain about
fetching the whitelist setting.
Change-Id: I030c0c66771afcb987e0679595a2d662f7c3ea9e
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Recv Message Queue and SEL are enabled by default.
Event Message buffer are disabled by default (not supported).
Any request that try to change the mask will be rejected.
Test:
test pass with ipmitool
Change-Id: Ia6bd4a6bf7b2b04dcfde6bfec910ca854a7aaeb8
Signed-off-by: Jia, Chunhui <chunhui.jia@linux.intel.com>
|