<div dir="ltr"><div><br></div><div>Hi Geert,</div><div><br></div><div>That is terribly helpful.  Thanks a lot!</div><div><br></div><div>Although 'the whole world is not Linux', your explanation "Dnsmasq listens on ports 53, 67 and 69. That requires<br>root privilege; Avoiding to run dnsmasq as root can be done with net capabilities" seems a terrific candidate to go in the man page :)  Would you like me to prepare a pull request?<br></div><div><br></div><div>Regards</div><div>Kristoffel</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, May 13, 2019 at 11:35 PM Geert Stappers <<a href="mailto:stappers@stappers.nl">stappers@stappers.nl</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Mon, May 13, 2019 at 12:51:09PM +0200, Kristoffel Pirard wrote:<br>
> On Mon, 13 May 2019, 12:36 Geert Stappers wrote:<br>
> > On 13-05-2019 11:02, Roy Marples wrote:<br>
> > > On 13/05/2019 09:31, Kristoffel Pirard wrote:<br>
> > >> The dnsmasq man page for the --user parameter says that "Dnsmasq must<br>
> > >> _normally_ be started as root".  We tested starting as non-root user,<br>
> > >> but with capabilities cap_net_bind_service, cap_net_admin,<br>
> > >> cap_net_raw.  It currently seems to work, but I'm debating if we<br>
> > >> should actually use this 'hack'.<br>
> > >><br>
> > >> So should the ambiguous adverb 'normally' be removed from the<br>
> > >> documentation?  If not, what are the circumstances in which it is<br>
> > >> allowed to not start as root?<br>
> > ><br>
> > > The whole world is not Linux. Most other OS's don't have these caps.<br>
> > ><br>
> > ><br>
> > In other words:    The _normally_  in  'Dnsmasq must normally be started<br>
> > as root' is correct.<br>
> ><br>
> So I should interpret it as 'unless you have a really good reason and you<br>
> know what you're doing'?  (Which I answer 'no' to twice)<br>
<br>
<br>
] 'Dnsmasq must normally be started as root'<br>
<br>
<br>
Read that as "Dnsmasq listens on ports 53, 67 and 69. That requires<br>
root privilege."  Running a process as root does get that privilege.<br>
Yes we did that all the time in days before the fear.<br>
<br>
Avoiding to run Dnsmasq as root can be done with "net capabilities"<br>
<br>
> > >> We tested starting as non-root user, but with capabilities<br>
> > >> cap_net_bind_service, cap_net_admin, cap_net_raw.<br>
<br>
:-)<br>
<br>
> > >> It currently seems to work,<br>
<br>
I do read that as "Confirming that cap_net_*** works"<br>
<br>
<br>
> > >> but I'm debating if we should actually use this 'hack'.<br>
<br>
<br>
<br>
<br>
Groeten<br>
Geert Stappers<br>
-- <br>
Leven en laten leven<br>
<br>
_______________________________________________<br>
Dnsmasq-discuss mailing list<br>
<a href="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk" target="_blank">Dnsmasq-discuss@lists.thekelleys.org.uk</a><br>
<a href="http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss" rel="noreferrer" target="_blank">http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss</a><br>
</blockquote></div>