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

Apply detected capabilities and disable DHCP if not capable. #1049

Merged
merged 3 commits into from Apr 2, 2022

Conversation

dschaper
Copy link
Member

@dschaper dschaper commented Apr 2, 2022

s6-setuidgid changes users and the new docker binary drops all capabilities on user change. Revert the revert to use capsh again to push caps to Ambient.

Detect if NET_ADMIN is not available and DHCP_ACTIVE=true. Warn user that DHCP will not be started but continue in DNS only mode.

Tested with the following runs on Debian Buster:

  docker run -it --rm --name=pitest --network=host -e FTLCONF_DEBUG_CAPS=true -e DHCP_ACTIVE=true -e DHCP_START=8.8.8.8 -e DHCP_END=9.9.9.9 -e DHCP_ROUTER=12.12.12.12 djschaper/pihole-caps-test:new
  docker run -it --rm --name=pitest --network=host -e FTLCONF_DEBUG_CAPS=true  djschaper/pihole-caps-test:new
  docker run -it --rm --name=pitest  -e FTLCONF_DEBUG_CAPS=true -e DHCP_ACTIVE=true -e DHCP_START=8.8.8.8 -e DHCP_END=9.9.9.9 -e DHCP_ROUTER=12.12.12.12 djschaper/pihole-caps-test:new
  docker run -it --rm --name=pitest djschaper/pihole-caps-test:new

DHCP && host network
DHCP && bridge network
NO DHCP && host network
NO DHCP && bridge network

All good.

ozeliurs and others added 3 commits April 2, 2022 14:25
@dschaper dschaper merged commit b76ffa4 into dev Apr 2, 2022
@dschaper dschaper deleted the fix/capsh_call branch April 2, 2022 19:10
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

3 participants