Conversation
|
@ngrigoriev - could you give this branch a go and see if it solves the issues you mentioned in #1085? To test, please clone the repository locally, and run the following from within the directory https://docs.pi-hole.net/docker/build-image/#using-the-built-image |
|
@dschaper any review news? |
|
The only way to trigger this is to set the However, that causes a lot more problems than just being unable to set the caps... |
You can simulate it by setting In your compose file. It will give some errors, but Using the current I'm not saying it is a good idea to start FTL without the caps, but some users might have reasons to do so (see here) |
|
I'm still not really sure how to test this. Rebasing on latest |
42f9faf to
78ffcbe
Compare
…ested capability Signed-off-by: yubiuser <github@yubiuser.dev>
Signed-off-by: yubiuser <github@yubiuser.dev>
Signed-off-by: yubiuser <github@yubiuser.dev>
Co-authored-by: Adam Warner <me@adamwarner.co.uk> Signed-off-by: yubiuser <github@yubiuser.dev>
| echo " Cannot run as non-root." | ||
| echo " If you are seeing this error, please set the environment variable 'DNSMASQ_USER' to the value 'root'" |
There was a problem hiding this comment.
Do we need so many spaces here?
I suggest to use 8 spaces for indentation:
| echo " Cannot run as non-root." | |
| echo " If you are seeing this error, please set the environment variable 'DNSMASQ_USER' to the value 'root'" | |
| echo " Cannot run as non-root." | |
| echo " If you are seeing this error, please set the environment variable 'DNSMASQ_USER' to the value 'root'" |
| echo " [!] WARNING: No capabilities for pihole-FTL available." | ||
| echo " Pi-hole functions may not work as expected." | ||
| echo " Please ensure that the container has the required capabilities." |
There was a problem hiding this comment.
Same here.
Use 8 spaces for indentation:
| echo " [!] WARNING: No capabilities for pihole-FTL available." | |
| echo " Pi-hole functions may not work as expected." | |
| echo " Please ensure that the container has the required capabilities." | |
| echo " [!] WARNING: No capabilities for pihole-FTL available." | |
| echo " Pi-hole functions may not work as expected." | |
| echo " Please ensure that the container has the required capabilities." |
Improves the capability check. Inspired by #1085 (comment)
It does three things
NET_ADMINeven when this would be the only cap that would be checked and could not be granted.CAP_STRis empty. See the linked comment above. The error was wrong in the first place, as it did not check if we failed to grant the caps but ifCAP_STRis empty. And it is empty if the caps are not available to the container.pihole-FTLfrom checking the user. This should be a two-step process.