11
29
Fork
You've already forked ipmitool
33

Providing a privilege option (-L <PRIV>) silences the error output #31

Open
opened 2024年04月02日 05:12:29 +02:00 by k_pakhomov · 2 comments
Contributor
Copy link

The issue
Providing a privilege command option (-L <PRIV>) to a list of arguments "silences" the command result output, when the result is expected to be an error.

IPMITOOL Version

ipmitool version 1.8.19.16.g81b8242

To Reproduce

Provide -L USER command option to a command requiring a higher privilege, e.g.:

$ ipmitool -L USER -I lanplus -U test_user -P some_pass -H 11.22.33.44 lan print 1

Expected behavior
Error message output in console:

IPMI command failed: Insufficient privilege level

Actual behavior
No error messages.

Additional context

  1. The same command reproduced, but with the -v option for verbose output:
$ ipmitool -L USER -I lanplus -U test_user -P some_pass -H 11.22.33.44 lan print 1
Loading IANA PEN Registry...
Using best available cipher suite 17
Running Get VSO Capabilities my_addr 0x20, transit 0, target 0x20
Invalid completion code received: Invalid command
Discovered IPMB address 0x0
Get LAN Parameter 'Set in Progress' command failed: Insufficient privilege level
  1. The same command, but without the -L <priv> option (note that the test_user has USER level privilege):
$ ipmitool -I lanplus -U test_user -P some_pass -H 11.22.33.44 lan print 1
Set Session Privilege Level to ADMINISTRATOR failed: Unknown (0x81)
Error: Unable to establish IPMI v2 / RMCP+ session
**The issue** Providing a privilege command option (`-L <PRIV>`) to a list of arguments "silences" the command result output, when the result is expected to be an error. **IPMITOOL Version** ```none ipmitool version 1.8.19.16.g81b8242 ``` **To Reproduce** Provide `-L USER` command option to a command requiring a higher privilege, e.g.: ```none $ ipmitool -L USER -I lanplus -U test_user -P some_pass -H 11.22.33.44 lan print 1 ``` **Expected behavior** Error message output in console: ```none IPMI command failed: Insufficient privilege level ``` **Actual behavior** No error messages. **Additional context** 1. The same command reproduced, but with the `-v` option for verbose output: ```none $ ipmitool -L USER -I lanplus -U test_user -P some_pass -H 11.22.33.44 lan print 1 Loading IANA PEN Registry... Using best available cipher suite 17 Running Get VSO Capabilities my_addr 0x20, transit 0, target 0x20 Invalid completion code received: Invalid command Discovered IPMB address 0x0 Get LAN Parameter 'Set in Progress' command failed: Insufficient privilege level ``` 2. The same command, but without the `-L <priv>` option (note that the test_user has USER level privilege): ```none $ ipmitool -I lanplus -U test_user -P some_pass -H 11.22.33.44 lan print 1 Set Session Privilege Level to ADMINISTRATOR failed: Unknown (0x81) Error: Unable to establish IPMI v2 / RMCP+ session ```

I can't reproduce this with OpenBMC and ipmitool version 1.8.19.48.g4904956

I can't reproduce this with OpenBMC and `ipmitool version 1.8.19.48.g4904956`
Author
Contributor
Copy link

Just reproduced on ipmitool version 1.8.19.48.g4904956 by creating user with a USER priv level. Will investigate further.

Just reproduced on `ipmitool version 1.8.19.48.g4904956` by creating user with a `USER` priv level. Will investigate further.
Sign in to join this conversation.
No Branch/Tag specified
master
bugfix/43-Fix-timezone-and-DST-in-SEL
pages
bugfix/fix-ci-builds
feature/refactor-sdr-name-handling
cleanup/nm
feature/add-support-for-boot-mailbox
codefactor
bugfix/26
IPMITOOL_1_8_19
IPMITOOL_1_8_18
IPMITOOL_1_8_17
IPMITOOL_1_8_16
IPMITOOL_1_8_15
IPMITOOL_1_8_15RC1
IPMITOOL_1_8_14
IPMITOOL_1_8_14RC2
IPMITOOL_1_8_14RC1
ipmitool
IPMITOOL_1_8_13
IPMITOOL_1_8_13RC1
IPMITOOL_1_8_12
IPMITOOL_1_8_9
IPMITOOL_1_8_8
IPMITOOL_1_8_7
IPMITOOL_1_8_6
IPMITOOL_1_8_5
IPMITOOL_1_8_0
IPMITOOL_S10_U1
IPMITOOL_1_6_1
IPMITOOL_1_6_0
IPMITOOL_1_5_9
IPMITOOL_1_5_8
IPMITOOL_1_5_7
IPMITOOL_1_5_6
IPMITOOL_1_5_4
IPMITOOL_1_4_1_1
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
IPMITool/ipmitool#31
Reference in a new issue
IPMITool/ipmitool
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?