Skip to content

dhcpcd: unprivileged service - #53404

Open
dkwo wants to merge 1 commit into
void-linux:masterfrom
dkwo:dhcpcd-cap
Open

dhcpcd: unprivileged service#53404
dkwo wants to merge 1 commit into
void-linux:masterfrom
dkwo:dhcpcd-cap

Conversation

@dkwo

@dkwo dkwo commented Dec 7, 2024

Copy link
Copy Markdown
Contributor

I tested the changes in this PR: yes
If not using privsep, these capabilieties are enough in my tests to run as non-root user.

@ahesford ahesford added the core core package label Dec 9, 2024
@dkwo
dkwo force-pushed the dhcpcd-cap branch 3 times, most recently from 59abd2a to 5af5b19 Compare February 26, 2025 15:15
@dkwo dkwo changed the title [rfc] dhcpcd: use setpriv in service to run as non-root dhcpcd: add unprivileged service Jun 14, 2025
@dogknowsnx

dogknowsnx commented Aug 12, 2025

Copy link
Copy Markdown
Contributor

Been running v10.2.4 for several weeks now without issues - haven't tested this PR though.

@dkwo

dkwo commented Aug 14, 2025

Copy link
Copy Markdown
Contributor Author

You are also welcome to test this pr: the usual root service is still there, unchanged.

@dogknowsnx

dogknowsnx commented Aug 14, 2025

Copy link
Copy Markdown
Contributor

So just in theory before testing this:

  • changing the group is fine since we'd be root otherwise anyway
  • excluding the world from /etc/dhcpcd.conf is desirable in terms of security
  • the changes to /run/dhcpcd won't affect root access, either, and are only effective during runtime
  • I'm not familiar with the exec flags, tbh - I won't have to add myself to the _dhcpcd group in order for this to work, correct?

@dkwo

dkwo commented Aug 14, 2025 via email

Copy link
Copy Markdown
Contributor Author

@dogknowsnx

dogknowsnx commented Oct 9, 2025

Copy link
Copy Markdown
Contributor

@dkwo Maybe adjust the title reflecting the update, as well

@dkwo dkwo changed the title dhcpcd: add unprivileged service dhcpcd: add unprivileged service, update to 10.2.4 Oct 10, 2025
@github-actions

github-actions Bot commented Jan 8, 2026

Copy link
Copy Markdown

Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.

@ahesford

Copy link
Copy Markdown
Member

My objections for wpa_supplicant also apply here.

@dkwo

dkwo commented Mar 21, 2026

Copy link
Copy Markdown
Contributor Author

Although this has been working fine for me, it can be more tricky than the wpa_supplicant case: even if we ignore setpriv (as we should), this daemon runs many hooks, and I did not check that all of them work fine. I think I can fix the resolvconf one, but I do not use the others.

@dkwo dkwo changed the title dhcpcd: add unprivileged service, update to 10.2.4 dhcpcd: unprivileged service Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core core package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants