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

Why allow empty privilege? #13

Open
joseph-reynolds opened this issue Mar 18, 2022 · 0 comments
Open

Why allow empty privilege? #13

joseph-reynolds opened this issue Mar 18, 2022 · 0 comments

Comments

@joseph-reynolds
Copy link

In the excerpt from

if (!priv.empty() &&

void UserMgr::throwForInvalidPrivilege(const std::string& priv)
{
    if (!priv.empty() &&
        (std::find(privMgr.begin(), privMgr.end(), priv) == privMgr.end()))
    { ...snip... }
}

Why is the empty privilege allowed? Is this related to the priv-noaccess (BMCWeb's NoAccess role)? Can this be removed?
It seems like the caller should be qreuied to specify a valid (nonempty) privilege role (per https://github.com/openbmc/docs/blob/master/architecture/user-management.md#supported-privilege-roles).

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

No branches or pull requests

1 participant