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

RFE: lift root requirements for some bootc commands #409

Open
mrguitar opened this issue Mar 20, 2024 · 1 comment
Open

RFE: lift root requirements for some bootc commands #409

mrguitar opened this issue Mar 20, 2024 · 1 comment
Labels
area/cli Related to the client/CLI enhancement New feature or request

Comments

@mrguitar
Copy link
Contributor

Feel free to push back on this, but there are a number of rpm-ostree commands that can be run w/o sudo access. rpm-ostree status is what comes to mind. I believe we have policykit (or something like that!) to enable certain commands from non-privileged users. It would be nice if we could do the same for bootc.

I think we want any user w/ shell access to be able to querry:

$ bootc status
ERROR Status: Querying root privilege: This command requires root privileges

Thoughts?

@cgwalters cgwalters added enhancement New feature or request area/cli Related to the client/CLI labels Mar 20, 2024
@cgwalters
Copy link
Collaborator

Yeah, this one is a bit harder as it heavily intersects with #2 which is a big change.

An issue with rpm-ostree in general is I think not all use cases will want to necessarily make the system state accessible to unprivileged users - especially as we're likely to expand what data is there.

My offhand instinct here is the easiest thing would be:

  • Add a bootc-readonly-unprivileged.{path,service} unit that, when enabled, monitors for changes in e.g. /ostree (for which we bump the mtime on changes) and basically just does bootc status --json > /run/bootc/status.json that is world-readable
  • Teach bootc status when run unprivileged to just parse that JSON

Obviously whether it's enabled by default would be an important property. I could get behind it being on by default upstream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli Related to the client/CLI enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants