Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set rmcp session privilege level in session activation #168

Merged
merged 2 commits into from
May 31, 2024

Conversation

canteuni
Copy link
Contributor

The issue

After PR #144 was merged, I tried to connect to a BMC using an "OPERATOR" user with interface "rmcp", but I kept getting error messages such as :

CompletionCodeError cc=0x86 desc=requested maximum privilege level exceeds user and/or channel privilege limit

It works perfectly with interface "ipmitool".

The cause

I think this error comes from the _activate_session method in pyipmi/interfaces/rmcp.py, which uses a hardcoded Session.PRIV_LEVEL_ADMINISTRATOR by default. If the BMC user only has "OPERATOR" privilege for example, trying to establish a session with maximum privilege requested set to "ADMINISTRATOR" it will result in an "Insufficient privilege" IPMI error.


I have also added an example of set_priv_level usage in the README and in the examples/ folder to show how it is supposed to be used.

@coveralls
Copy link

Coverage Status

coverage: 69.565%. remained the same
when pulling 689bf97 on canteuni:set_rmcp_session_privilege_level
into 3e018e3 on kontron:master.

@canteuni
Copy link
Contributor Author

Hi @hthiery , will you have the time to look at this ? No pressure of course, I can provide additional details if needed.

@hthiery hthiery merged commit 246c4e8 into kontron:master May 31, 2024
15 checks passed
@hthiery
Copy link
Contributor

hthiery commented May 31, 2024

Looks reasonable .. I merged it

@hthiery
Copy link
Contributor

hthiery commented May 31, 2024

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants