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

hooks: enable polkit for unconfined processes #161

Merged
merged 3 commits into from
Jan 4, 2024

Conversation

alfonsosanchezbeato
Copy link
Member

polkit is needed in some cases for communication between services shipped in the base, for instance when systemd-networkd talks to systemd-hostnamed to set the hostname. Enable to fix these use cases. Note that this does not help yet if we want to use it from a snap.

polkit is needed in some cases for communication between services
shipped in the base, for instance when systemd-networkd talks to
systemd-hostnamed to set the hostname. Enable to fix these use cases.
Note that this does not help yet if we want to use it from a snap.
Copy link
Contributor

@valentindavid valentindavid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two comments so far.

  • xml-core is installed. I do not think it makes sense to keep it. It believe it is only useful for sgml docs. I am guessing it is a dependency of the post install script of some of the packages.
  • /usr/lib/tmpfiles.d/polkitd.conf points to /etc/polkit-1/rules.d and /var/lib/polkit-1. We should add those in writable-paths. The first one is probably not needed now. But I am guessing the second should be.

@valentindavid
Copy link
Contributor

* `/usr/lib/tmpfiles.d/polkitd.conf` points to `/etc/polkit-1/rules.d` and `/var/lib/polkit-1`. We should add those in writable-paths. The first one is probably not needed now. But I am guessing the second should be.

Nevermind for /var/lib/polkit-1, it seems was useful for localauthority for 3rd party packages. And it has been removed in recent version of polkit. I do not think we need it, and I do not think we every will.

@alfonsosanchezbeato
Copy link
Member Author

Two comments so far.

  • xml-core is installed. I do not think it makes sense to keep it. It believe it is only useful for sgml docs. I am guessing it is a dependency of the post install script of some of the packages.

It is used to generate xml catalog files, which I'm not sure if polkit xml parser will need. I have removed the executables provided by xml-core, as we definitely don't need them after installation of packages has happened.

  • /usr/lib/tmpfiles.d/polkitd.conf points to /etc/polkit-1/rules.d and /var/lib/polkit-1. We should add those in writable-paths. The first one is probably not needed now. But I am guessing the second should be.

Goot point, I have added the one under /etc as it would be something we will eventually want for snaps or for workarounds.

@alfonsosanchezbeato
Copy link
Member Author

@valentindavid thanks for your review, I've addressed your comments now

@alfonsosanchezbeato alfonsosanchezbeato merged commit 805af7a into snapcore:main Jan 4, 2024
2 of 3 checks passed
alfonsosanchezbeato added a commit to alfonsosanchezbeato/core-base that referenced this pull request Jan 4, 2024
polkit is needed in some cases for communication between services
shipped in the base, for instance when systemd-networkd talks to
systemd-hostnamed to set the hostname. Enable to fix these use cases.
Note that this does not help yet if we want to use it from a snap.

Backported from snapcore#161
alfonsosanchezbeato added a commit that referenced this pull request Jan 5, 2024
polkit is needed in some cases for communication between services
shipped in the base, for instance when systemd-networkd talks to
systemd-hostnamed to set the hostname. Enable to fix these use cases.
Note that this does not help yet if we want to use it from a snap.

Backported from #161
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.

None yet

2 participants