bc5e9bab | 07-May-2019 |
Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com> |
channelcmds: move get channel access to new IPMI provider API
Update the get channel access command to use the new IPMI provider API. As a part of this change, the command is now able to use the spe
channelcmds: move get channel access to new IPMI provider API
Update the get channel access command to use the new IPMI provider API. As a part of this change, the command is now able to use the special channel 0x0e.
Tested-by: ipmitool -I lanplus -H ... -U ... channel getaccess 0xe 1 Maximum User IDs : 15 Enabled User IDs : 1
User ID : 1 User Name : root Fixed Name : No Access Available : callback Link Authentication : enabled IPMI Messaging : enabled Privilege Level : ADMINISTRATOR Enable Status : enabled
Change-Id: I97ad74ae183a15dd5f45dfa70341225794087b2a Signed-off-by: NITIN SHARMA <nitin1x.sharma@intel.com> Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com> Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
show more ...
|
89e4bf28 | 02-May-2019 |
NITIN SHARMA <nitin1x.sharma@intel.com> |
channelcmds: move set channel access to new ipmi provider API
This updates the set channel access command to use the new IPMI provider API. As part of this change, this command should now work with
channelcmds: move set channel access to new ipmi provider API
This updates the set channel access command to use the new IPMI provider API. As part of this change, this command should now work with the special channel 0x0e.
Tested-by: (set channel access: 6 0x40) # ipmitool -I lanplus -H ... -U ... raw 6 0x40 0xe 0x82 0x84 (get channel access: 6 0x41) # ipmitool -I lanplus -H ... -U ... raw 6 0x41 0xe 0x80 02 04 # ipmitool raw 6 0x40 1 0x80 0x83 # ipmitool raw 6 0x41 1 0x80 00 03
Change-Id: Icc6e8ff7deebb7a6f89af616fa70258ea18ed0ce Signed-off-by: NITIN SHARMA <nitin1x.sharma@intel.com> Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com> Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
show more ...
|
5ed39595 | 14-May-2019 |
Vernon Mauery <vernon.mauery@linux.intel.com> |
Update current channel mechanism to be usable by netipmid
Getting the current channel is really just an if statement for the requested channel (check for 0x0e) to know if the device channel which is
Update current channel mechanism to be usable by netipmid
Getting the current channel is really just an if statement for the requested channel (check for 0x0e) to know if the device channel which is determined by -c <channel> by netipmid and by dbus names in host ipmid. Previously, an ipmi::Context was passed in, but netipmid does not use Context, it just has the channel number. So This change makes it so the the requested channel number and the device channel number are the arguments, which makes the same function usable in both netipmid and ipmid.
Tested-by: run the get user access command to see that it uses the current channel.
# remote connection over channel 1 ipmitool -I lanplus -H <> ... raw 6 0x44 0xe 1 0f 41 00 74 ipmitool -I lanplus -H <> ... raw 6 0x44 1 1 0f 41 00 74
# on bmc console (current channel does not use users) ipmitool raw 6 0x44 0xe 1 Unable to send RAW command (channel=0x0 netfn=0x6 lun=0x0 cmd=0x44 rsp=0xcc): Invalid data field in request # request info for channel 1 ipmitool raw 6 0x44 1 1 0f 41 00 74
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com> Change-Id: Iadad6f93e47d031a6f4724a3db5161051c5b520a
show more ...
|
e004e221 | 08-May-2019 |
Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com> |
user-mgmt: Update user data file, only for sync.
IPMI user configuration is cross synced with phosphor-user-manager and written to the non-volatile data on every boot. This commit limits the write o
user-mgmt: Update user data file, only for sync.
IPMI user configuration is cross synced with phosphor-user-manager and written to the non-volatile data on every boot. This commit limits the write only when there is real sync issue, and update required.
Tested: 1. Verified the ipmitool user list & commands 2. Verified that file write happens only when there is real sync update with phosphor-user-manager
Change-Id: Ia40be91f281656288ca96ca44bc9699daee7c3b4 Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
show more ...
|
16b8693d | 01-May-2019 |
Vernon Mauery <vernon.mauery@linux.intel.com> |
remove usage of sdbusplus::message::variant
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 sdbusp
remove usage of sdbusplus::message::variant
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>
show more ...
|
687df401 | 08-May-2019 |
Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com> |
user-mgmt: sync ipmi user & channel conf file
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
user-mgmt: sync ipmi user & channel conf file
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>
show more ...
|
735ee953 | 15-Feb-2019 |
Vernon Mauery <vernon.mauery@linux.intel.com> |
look up channel from D-Bus connection
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 sh
look up channel from D-Bus connection
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>
show more ...
|
788362ce | 14-Apr-2019 |
Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com> |
API support to update password for special user
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
API support to update password for special user
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>
show more ...
|
f442e119 | 09-Apr-2019 |
Vernon Mauery <vernon.mauery@linux.intel.com> |
move variant to std namespace
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,
move variant to std namespace
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>
show more ...
|
5b2535f8 | 04-Apr-2019 |
Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com> |
Rewrite set & get user access cmd to new provider
Rewritten Get & Set user access command to new provider API. Note: This is ready for channel number 0xE handling.
Tested: 1. Verified ipmitool user
Rewrite set & get user access cmd to new provider
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>
show more ...
|
c46f6cd7 | 20-Mar-2019 |
smriti <smriti.ayushi@intel.com> |
Support - Get channel capabilities in host intf
Support added for get channel authentication capabilities command to be responded in host interface too, by adding the same under user commands provid
Support - Get channel capabilities in host intf
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>
show more ...
|
b5a0f16d | 04-Mar-2019 |
Saravanan Palanisamy <saravanan.palanisamy@intel.com> |
Add: Get channel payload support command
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 & Ne
Add: Get channel payload support command
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>
show more ...
|
e08fbffc | 03-Apr-2019 |
Vernon Mauery <vernon.mauery@linux.intel.com> |
Only include ipmid/api.hpp for the new API
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
Only include ipmid/api.hpp for the new API
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>
show more ...
|
30b01124 | 03-Apr-2019 |
Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com> |
Add convert current channel number function
Support for convert current channel number based on ipmi::Context is added.
Tested: Verified by updating the channel number manually and function returns
Add convert current channel number function
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>
show more ...
|
90b00c71 | 15-Jan-2019 |
Suryakanth Sekar <suryakanth.sekar@linux.intel.com> |
Adding Set Password API support in Userlayer
Moved the pam function from libusercommand to libuserlayer Added the setPassword API in user layer.
There are modules which requires to use set password
Adding Set Password API support in Userlayer
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>
show more ...
|
2fe9282f | 02-Mar-2019 |
Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com> |
[User Mgmt]: Update local user enabled state cache
Added missing user enabled state update, to reflect the enabled state immediately.
Tested-by: 1.verified updated user enabled state is reflected i
[User Mgmt]: Update local user enabled state cache
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>
show more ...
|
55768e35 | 02-Mar-2019 |
Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com> |
Cleanup: Get rid of duplicate getChannelName()
Get rid of duplicate getChannelName function. Use the one with uint8_t channelNum.
Tested-by: 1. Verified RMCP+ session establishement works with newl
Cleanup: Get rid of duplicate getChannelName()
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>
show more ...
|
e7329c71 | 08-Oct-2018 |
Vernon Mauery <vernon.mauery@linux.intel.com> |
ipmid: Compiler-generated unpacking and packing of messages
handler.hpp has the templated wrapping bits for ipmi command handler callbacks implemented.
message.hpp has the serialization/deserializa
ipmid: Compiler-generated unpacking and packing of messages
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>
show more ...
|
1bb0c7fc | 21-Dec-2018 |
Vernon Mauery <vernon.mauery@linux.intel.com> |
ipmid: move channel code from libuserlayer to libchannellayer
Separate the channel implementation from the user implementation. It is possible to link only against the channel layer, but if code is
ipmid: move channel code from libuserlayer to libchannellayer
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>
show more ...
|
99d1ba05 | 21-Feb-2019 |
Patrick Venture <venture@google.com> |
user_mgmt: drop c_str() when param is std::string
Do not use c_str() when parameter is std::string.
Caught via cppcheck.
Change-Id: Iad7c1296d8be363df10ccf9278231187d7d29052 Signed-off-by: Patrick
user_mgmt: drop c_str() when param is std::string
Do not use c_str() when parameter is std::string.
Caught via cppcheck.
Change-Id: Iad7c1296d8be363df10ccf9278231187d7d29052 Signed-off-by: Patrick Venture <venture@google.com>
show more ...
|
997a7a08 | 01-Feb-2019 |
Vernon Mauery <vernon.mauery@linux.intel.com> |
Create the libchannellayer library so it can split from libuserlayer
This will hold the channel manangement interface and implementation, which can be used separately from the libuserlayer.
Change-
Create the libchannellayer library so it can split from libuserlayer
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>
show more ...
|
4b0ddb68 | 25-Jan-2019 |
Lei YU <mine260309@gmail.com> |
Set init_priority attribute for global variables in shared lib
The code gets unspecified initializatio order for the global/static variables in a shared library.
If unluck, a global/static variable
Set init_priority attribute for global variables in shared lib
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>
show more ...
|
194375f2 | 14-Dec-2018 |
William A. Kennington III <wak@google.com> |
Create libipmid and libipmid-host
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 da
Create libipmid and libipmid-host
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>
show more ...
|
74a2102e | 13-Dec-2018 |
Johnathan Mantey <johnathanx.mantey@intel.com> |
IPMI channel to NIC device mapping modified within JSON config file
The IPMI to NIC channel mapping was done using a hard coded scheme. The scheme used generic channel names which were then mapped t
IPMI channel to NIC device mapping modified within JSON config file
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>
show more ...
|
2dfe7f8d | 11-Dec-2018 |
Johnathan Mantey <johnathanx.mantey@intel.com> |
Move public variables to the class private space.
Moved two variables only used by the class into it's private variable space.
Highlighted a method prototype that was buried within the variable lis
Move public variables to the class private space.
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>
show more ...
|