Skip to main content
Topic: dnsmasq does not run as user dnsmasq (Read 656 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

dnsmasq does not run as user dnsmasq

The current dnsmasq service  is set to  run dnsmasq as the "dnsmasq" user but can't. Its called with the -d flag, but it wont drop its privileges in this mode and runs as root.

Code: [Select]
type            = process
command         = /usr/bin/dnsmasq -d --enable-dbus -u dnsmasq -g dnsmasq
smooth-recovery = true
logfile          = /var/log/dinit/dnsmasq.log
depends-on      = dbus

It works as a bgprocess, like below.

Code: [Select]
type            = bgprocess
command         = /usr/bin/dnsmasq --enable-dbus -u dnsmasq -g dnsmasq
pid-file         = /run/dnsmasq.pid
smooth-recovery = true
logfile          = /var/log/dinit/dnsmasq.log
depends-on      = dbus

Re: dnsmasq does not run as user dnsmasq

Reply #1
Changed the flags from -d to -k and now it spawns a new process which drops the privileges. Logs, however, will be handled by syslog.
now only the dinit guy in artix

Re: dnsmasq does not run as user dnsmasq

Reply #2
Thanks. That works.

I use syslog. The logs from dinit don't have timestamps. Currently, I use a little script to remove the "logfile" entries from the service files. Is there someway, with dinit, to have the timestamps?

Re: dnsmasq does not run as user dnsmasq

Reply #3
For now, unfortunately, no timestamps. You can always request the timestamps on logs in dinit's author github, or I can do that for you.
now only the dinit guy in artix