Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 587586 - net-dns/dnsmasq: improve systemd unit (including security hardening)
Summary: net-dns/dnsmasq: improve systemd unit (including security hardening)
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Patrick McLean
Keywords: PATCH
Depends on:
Reported: 2016-06-30 14:17 UTC by Craig Andrews
Modified: 2016-08-08 21:12 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---

diff based on c1 PR link (1798.patch,1.33 KB, patch)
2016-06-30 14:40 UTC, Ben Kohler
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Craig Andrews gentoo-dev 2016-06-30 14:17:20 UTC
The dnsmasq.service systemd unit can be improved by having dnsmasq never run as root, restricting capabilities as much as possible, and limiting file system access.

This has been discussed on the forums at
Comment 1 Craig Andrews gentoo-dev 2016-06-30 14:18:00 UTC
Comment 2 Ben Kohler gentoo-dev 2016-06-30 14:40:10 UTC
Created attachment 439234 [details, diff]
diff based on c1 PR link
Comment 3 Craig Andrews gentoo-dev 2016-06-30 15:01:03 UTC
I've posted to the upstream mailing list requesting that upstream distribute a systemd unit and that it have these features:
Comment 4 Matthias Maier gentoo-dev 2016-08-08 21:12:12 UTC
The configuration option


is only with systemd-229, or newer.

While I agree that some system hardening is a nice feature to introduce I would suggest that we let dnsmasq still handle the suid and sguid bits on its own. This has the advantage that the daemon can actually drop privileges/capabilities once it is done with setup.

See #587588