-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Code that parsed `sudo ipmitool -c user list N` assumed there would be a header row printed and built the user hash keys from the first line. However `ipmitool user list` only prints the headers when invoked without `-c` which puts it into CSV output mode. When invoked with `-c` there is no header line and the first user was getting eaten up and treated as the header. Example ipmitool output: monorail@monorail-micro:~$ sudo ipmitool user list 1 ID Name Callin Link Auth IPMI Msg Channel Priv Limit 2 root true true true ADMINISTRATOR monorail@monorail-micro:~$ sudo ipmitool user -c list 1 2,root,true,true,true,ADMINISTRATOR This fix hard-codes the header values as the header that is printed when invoked without `-c` looks nigh-impossible to parse. The previous code was also eating the first user because that line was taken as the header line.
- Loading branch information
1 parent
0df7a66
commit 78f7cd6
Showing
3 changed files
with
8 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters