dnsmasq: fix remove pidfile on shutdown regression
Regression introduced by 3481d0d
dnsmasq: run as dedicated UID/GID
dnsmasq is unable to remove its own pidfile as /var/run/dnsmasq is owned
by root and now dnsmasq runs as dnsmasq:dnsmasq. Change directory
ownership to match.
dnsmasq initially starts as root, creates the pidfile, then drops to
requested non-root user. Until this fix dnsmasq had insufficient
privilege to remove its own pidfile.
Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
This commit is contained in:
parent
c5913264e7
commit
9209f4304b
1 changed files with 1 additions and 0 deletions
|
@ -643,6 +643,7 @@ start_service() {
|
||||||
mkdir -p $(dirname $CONFIGFILE)
|
mkdir -p $(dirname $CONFIGFILE)
|
||||||
mkdir -p /var/lib/misc
|
mkdir -p /var/lib/misc
|
||||||
touch /tmp/dhcp.leases
|
touch /tmp/dhcp.leases
|
||||||
|
chown dnsmasq:dnsmasq /var/run/dnsmasq
|
||||||
|
|
||||||
[ -f "$TIMESTAMPFILE" ] && rm -f "$TIMESTAMPFILE"
|
[ -f "$TIMESTAMPFILE" ] && rm -f "$TIMESTAMPFILE"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue