| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
Function must assume that object path without any network name
may be advertised, and must handle the condition accordingly.
Tested:
1. Verified that ipmi user is properly enabled with channel
based permission and it works fine.
Change-Id: Id51f09bb7c19a9750cb06c2c55f7271afc6b1d2a
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Function must assume that object path without user name may exist,
and must handle the condition accordingly.
Tested:
1. Verified when InterfacesAdded signal sent out from Phosphor-user-manager
under base user object for global attributes, ipmid is not crashed.
Resolves openbmc/phosphor-net-ipmid#10
Change-Id: Ib19af7ca8f05fd9f4553010caf347c677d9897e2
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
|
|
|
|
|
|
|
|
|
| |
Fixed wrong log entry tags to list the entries properly.
Tested: Verified it is comming in journalctl logs
Change-Id: I5352f9f87eb43414b4b04335ba43219e452785c6
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When phosphor-user-manager is started later than ipmid,
then ipmid misses to get the AvailableGroups list from
phosphor-user-manager. Further creation of user through ipmi
will end up creating user which doesn't belong to any group
at all. This fixes, by making sure, ipmi creates user only
if ipmi group is in available groups lists, and will do
re-query if it is empty.
Tested:
1. Verified the user creation behaviour with having dependency to
phosphor-user-manager and without.
2. Manually tested the following.
a. Stopped phosphor-user-manager & all ipmi
b. Started phosphor-host-ipmid
c. started phosphor-user-manager
d. using ipmitool user set name created user and verified that it
belongs to proper group as expected.
Change-Id: I5810babda0e70eb7b6bca577af2031da90dbb068
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When dependency with phosphor-user-manager is removed from host-ipmid,
both the daemons can start on it's own pace, causing host-ipmid to
miss both GetManagedObjects query and signal capture, as host-ipmid
is busy in doing the initialization. Updated code, such that user
initialization is posted and executed as part of io schedule.
Tested:
1. Verified that user list are properly listed after this change.
Note: Also, performed following tests to determine the order didn't cause any
problem. Verified with both ipmi_user.json deleted and preserved.
2. Started phosphor-user-manager after host-ipmid
3. Re-started phosphor-user-manager.
4. Started phosphor-host-ipmid after phosphor-user-manager.
5. Restarted phosphor-host-ipmid.
6. Added sleep code to force the scenario of GetManagedObjects fails, and
signals are captured. and GetManagedObject passes (when both are started).
Change-Id: Id5cc6ada6dd3472ddfd8803c49cd4a2a7fb6c58b
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, signal handler are registered after the GetManagedObjects
query. This may miss any signals generated in-between this time. Correct
flow must be to register for the signal first, followed by
GetManagedObjects query.
Tested:
1. Verified that user list are properly listed after this change.
Note: Also, performed following tests to determine the order didn't cause any
problem. Verified with both ipmi_user.json deleted and preserved.
2. Started phosphor-user-manager after host-ipmid.
3. Re-started phosphor-user-manager.
4. Started phosphor-host-ipmid after phosphor-user-manager.
5. Restarted phosphor-host-ipmid.
Change-Id: I124b5e96672e0456289bca7a2b889e4b897c0545
Signed-off-by: arun-pm <arun.p.m@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allowed password characters will be handled by password management,
instead of set user password command. This makes the checking to be
moved from set user password command to pam layer and accordingly
throw error, when the same is not valid.
Fix: So modified the code to handle with pam module itself.
Tested:
ipmitool user set password 6 0penBmc1\'
Set User Password command successful (user 6)
ipmitool user set password 6 0penBmc1\"
Set User Password command successful (user 6)
ipmitool user set password 6 12345678 //invalid password
IPMI command failed: Invalid data field in request
Set User Password command failed (user 6)
ipmitool user set password 3 asdf1234 //user id does not exit
IPMI command failed: Unspecified error
Set User Password command failed (user 3)
Signed-off-by: jayaprakash Mutyala <mutyalax.jayaprakash@intel.com>
Change-Id: Iba6e2c29a927d53e6ebdb5d32e83ecc7cbbd2fd0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Return proper error code 0x82 for session-less channel
Tested
1.verified with ipmitool raw commands
ipmitool raw 0x06 0x40 0x00 0x40 0x04
Unable to send RAW command (channel=0x0 netfn=0x6 lun=0x0 cmd=0x40
rsp=0x82): Unknown (0x82)
ipmitool raw 0x06 0x41 0x00 0x40
Unable to send RAW command (channel=0x0 netfn=0x6 lun=0x0 cmd=0x41
rsp=0x82): Unknown (0x82)
Signed-off-by: anil kumar appana <anil.kumarx.appana@intel.com>
Change-Id: I9ada001427a6c3dcaaf6de026f8831faa54c182d
|
|
|
|
|
|
|
|
|
| |
Cleaning up phosphor logging entry messages from
the usage of ':' to '=' in the whole user_channel
dir cpp files.
Signed-off-by: Ayushi Smriti <smriti.ayushi@linux.intel.com>
Change-Id: Ifa8eb35751279cf6bebd876105b7a4d24deb98a0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Atomic lock was missing in between volatile / non-volatile
channel configuration check and restore. This was causing
random failure when instances init channel management code.
Fixed the same, by having a lock for init channel.
Tested:
1. Verified that existing ipmitool commands still works
including user & channel commands
2. Verified that random failure doesn't happen.
Change-Id: I612917ea1a767e353d0b16b7dd9144e0e99d46e7
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix the issues found during code static scan
Tested:
test in board, function works fine.
1. busctl set-property for watchdog, it works fine.
2. It works by running "ipmitool chassis power soft".
3. run "ipmitool raw 0x6 0x46 1", get expected user information.
Change-Id: I7a2cc3c934db6a7531f8a8ea05956cb6d6337633
Signed-off-by: Chen,Yugang <yugang.chen@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[user_channel/passwd_mgr.cpp:220]: (style) The scope of the
variable 'userEPos' can be reduced.
[user_channel/passwd_mgr.cpp:358]: (style) The scope of the
variable 'userEPos' can be reduced.
[user_channel/passwd_mgr.cpp:444]: (style) Variable 'fd' is
assigned a value that is never used.
Tested: Not tested.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: If02125c422ab1e9c15c6420dbf8da6a52fb68541
|
|
|
|
|
|
|
|
|
|
| |
[user_channel/user_mgmt.cpp:1628]: (style) The scope
of the variable 'usrEnabled' can be reduced.
[user_channel/user_mgmt.cpp:310]: (style) Unused variable: update
Tested: Not tested.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Id38469ab5d5b0fa9c512f5a77fff1f1372e794c2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
By default, Serial Over LAN (SOL) payload access should be enabled
for all users in all channels. Ensure that this clause is met when
default ipmi_user.json file is created, usually because of BMC
re-flashing.
Tested-by:
1. Check SOL payload access values in ipmi_user.json after reflashing.
// Command - grep "std_payload1" /var/lib/ipmi/ipmi_user.json
// Response - OK.
...
"payload_enabled":{..."std_payload1":[true,true,...]...},
...
2. Check SOL payload access values in ipmi_user.json after BMC FW update
// Command and Response same as (1.). OK.
// ipmi_user.json file is updated upon its first write after FW update.
Signed-off-by: Saravanan Palanisamy <saravanan.palanisamy@linux.intel.com>
Change-Id: I604aac6d000eac40a3a3460ea46c6fe81d285dee
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Enabling SOL payload access for all users in all channels, by default.
It is not mandated by IPMI spec, but needed for backward-compatibility.
Tested-by:
1. Run Get User Payload Access Command for random user on LAN channel.
// Command - (channel 3 is of LAN channel type)
ipmitool -I lanplus...raw 0x06 0x4D 3 7
02 00 00 00 // Response
2. Disable SOL payload and rerun Get User Payload Access Command.
// Command
ipmitool -I lanplus...raw 0x06 0x4C 3 0x48 0x02 0 0x00 0
ipmitool -I lanplus...raw 0x06 0x4D 3 8
00 00 00 00 // Response
3. Run Get User Payload Access on non-LAN, session-less channel.
// Command - (channel 7 is KCS channel type)
ipmitool -I lanplus...raw 0x06 0x4D 7 7
Error:(...rsp=0xcc): Invalid data field in request // Response
4. Check SOL session activation and 'ipmi_user.json' file contents.
Change-Id: I48c50e6366a0025d5ae066c8a8f3694d2f710732
Signed-off-by: Saravanan Palanisamy <saravanan.palanisamy@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
IPMI Spec reference: Section 24.6, 24.7.
Support is added to get/set user access details for the
unreserved, supported payload types defined by Spec.
SOL is the only unreserved, supported payload currently.
If support is needed for unreserved std/oem payload
types in future, they can be enabled with minor source code
changes to this implementation.
All payload types are packed in a JSON object
"payload_enabled" in ipmi_user.json file.
Tested-by:
1. For user 8 in channel 3, Enable SOL payload.
// Command - (channel 3 is of LAN channel type)
ipmitool -I lanplus...raw 0x06 0x4C 3 0x8 0x02 0 0 0
// Verify it with Get User Payload Access Command
ipmitool -I lanplus...raw 0x06 0x4D 3 8
02 00 00 00 // Response
2. Disable SOL payload.
// Command
ipmitool -I lanplus...raw 0x06 0x4C 3 0x48 0x02 0 0x00 0
// Verify it with Get User Payload Access Command
ipmitool -I lanplus...raw 0x06 0x4D 3 8
00 00 00 00 // Response
3. Enable unsupported payload stdPayload7.
// Command
ipmitool -I lanplus...raw 0x06 0x4C 3 0x8 0x80 0 0 0
Error: Invalid data field in request // Response
Change-Id: Idc57b04a747e55666407d928d8b2169223501e5b
Signed-off-by: Saravanan Palanisamy <saravanan.palanisamy@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Change-Id: I8e14cfd3719c7fbef739f2aa01771bc4321ce290
Signed-off-by: Ofer Yehielli <ofery@google.com>
Tested: Enabled the exclude libuserlayer flag in
recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend
+EXTRA_OECONF_append_xxx = " --disable-libuserlayer"
+HOSTIPMI_PROVIDER_LIBRARY_remove_xxx = "libusercmds.so"
+NETIPMI_PROVIDER_LIBRARY_remove_xxx = "libusercmds.so"
Clean build and test that userlayer.so doesn't get included in the build
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
convertCurrentChannelNum(uint8_t) was deprecated in favor of an
actual working implementation. It was stubbed out for a while to
provide a broken, backwards-compatible interface, but now that all
of those have been removed in favor of the new interface that
actually works: convertCurrentChannelNum(uint8_t, uint8_t), the
old function can be removed.
Tested: Builds without any errors (means the old interface was removed)
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
Change-Id: I3796e890c7cc34333116b71a97db268abf5f0e89
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement get channel payload version command (IPMI specification
section 24.9). As per the specification, this command is basically a
hard-coded value that says we are using IPMI 2.0.
Tested:
ipmitool raw 6 0x4F 3 1 // Command
10 // Response
Change-Id: Id16723e7257361814b98f3c14d759f2919ad4c03
Signed-off-by: Ayushi 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update the get channel payload support command to use the new IPMI API.
This simplifies the code as well as adds support for the special IPMI
channel 0x0e.
Tested: ipmitool -I lanplus -H ... -U ... raw 6 0x4e 0xe
03 00 3f 00 00 00 00 00
ipmitool -I lanplus -H ... -U ... raw 6 0x4e 1
03 00 3f 00 00 00 00 00
Change-Id: I8b67d6f79c40299b4b653212a2f1f9d0c1a9087c
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
| |
Updated error message with proper config file name
Tested:
Verified that file name is properly listed in error message
Change-Id: I0c2552000f704f3b4b541b8fe90adec966a6616a
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PAM user authentication check must be performed, before any RMCP+
session establishment, as this will be able to check whether user
is already locked out, due to failed attempt.
This patch introduces the pam user check API, which will be used by
netipmid daemon.
Tested:
Verified the API call check and making sure it works.
Real testing is performed by including the same in
phosphor-ipmi-net for RMCP+ session establishment both
for user locked for failed attempt and normal case.
Commands used-
Created new user using ipmitool
ipmitool user set name 2 testuser
ipmitool user enable 2
ipmitool user set password 2 pas1tes2
ipmitool user priv 2 4 3
ipmitool user list 3 //New user entry can be seen listed
ipmitool channel getaccess 3 2 //For getting channel access
ipmitool channel setaccess 3 2 ipmi=on priviledge=4
Normal Case:
ipmitool -I lanplus -U testuser -P pas1tes2 -H <bmc ip> raw 6 1
//Command
23 00 00 00 02 bf 57 01 00 7b 00 00 00 00 00 //Response
Negative Case:
busctl set-property xyz.openbmc_project.User.Manager
/xyz/openbmc_project/user xyz.openbmc_project.User.AccountPolicy
MaxLoginAttemptBeforeLockout q 3
Tried 3 failed login attempts from webpage, and then tried to
establish IPMI RMCP+ as expected, session establishment failed.
wait for the timeout or unlock the user using-
busctl set-property xyz.openbmc_project.User.Manager
/xyz/openbmc_project/user/sayushi xyz.openbmc_project.User.Attributes
UserLockedForFailedAttempt b false
busctl get-property xyz.openbmc_project.User.Manager
/xyz/openbmc_project/user/sayushi xyz.openbmc_project.User.Attributes
UserLockedForFailedAttempt b false //Command
b false //Response
After this RMCP+ session will be established as usual.
Change-Id: I5ee2dc0848944a12f682f0775930091d32508bde
Signed-off-by: Ayushi Smriti <smriti.ayushi@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update the get channel info command to use the new IPMI provider API.
Because of the change, this command can support the use of the special
channel number 0x0e.
Tested-by:
(remote via RMCP+ interface)
ipmitool -I lanplus -H ... -U ... channel info
Channel 0x1 info:
Channel Medium Type : 802.3 LAN
Channel Protocol Type : IPMB-1.0
Session Support : multi-session
Active Session Count : 0
Protocol Vendor ID : 7154
Volatile(active) Settings
Alerting : disabled
Per-message Auth : enabled
User Level Auth : enabled
Access Mode : always available
Non-Volatile Settings
Alerting : disabled
Per-message Auth : enabled
User Level Auth : enabled
Access Mode : always available
(on host via kcs interface)
ipmitool channel info
Channel 0xf info:
Channel Medium Type : System Interface
Channel Protocol Type : KCS
Session Support : session-less
Active Session Count : 0
Protocol Vendor ID : 7154
Change-Id: Ica4262593acaefe12ccf70724ad4db40da344da4
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
Do not use c_str() when parameter is std::string.
Caught via cppcheck.
Change-Id: Iad7c1296d8be363df10ccf9278231187d7d29052
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|