mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 10:18:25 +00:00
Change ownership of pid file, to keep systemd happy.
This commit is contained in:
8
debian/changelog
vendored
8
debian/changelog
vendored
@@ -5,7 +5,13 @@ dnsmasq (2.79-1) unstable; urgency=low
|
|||||||
* Fix exit code for dhcp_release6 (closes: #833596)
|
* Fix exit code for dhcp_release6 (closes: #833596)
|
||||||
* Add project homepage to control file. (closes: #887764)
|
* Add project homepage to control file. (closes: #887764)
|
||||||
|
|
||||||
-- Simon Kelley <simon@thekelleys.org.uk> Sat, 20 Jan 2018 22:17:01 +0000
|
-- Simon Kelley <simon@thekelleys.org.uk> Tue, 6 Feb 2018 17:23:21 +0000
|
||||||
|
|
||||||
|
dnsmasq (2.78-2) unstable; urgency=high
|
||||||
|
|
||||||
|
* Change ownership of pid file, to keep systemd happy. (closes: #889336)
|
||||||
|
|
||||||
|
-- Simon Kelley <simon@thekelleys.org.uk> Tue, 6 Feb 2018 17:21:30 +0000
|
||||||
|
|
||||||
dnsmasq (2.78-1) unstable; urgency=high
|
dnsmasq (2.78-1) unstable; urgency=high
|
||||||
|
|
||||||
|
|||||||
@@ -541,7 +541,14 @@ int main (int argc, char **argv)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!read_write(fd, (unsigned char *)daemon->namebuff, strlen(daemon->namebuff), 0))
|
/* We're still running as root here. Change the ownership of the PID file
|
||||||
|
to the user we will be running as. Note that this is not to allow
|
||||||
|
us to delete the file, since that depends on the permissions
|
||||||
|
of the directory containing the file. That directory will
|
||||||
|
need to by owned by the dnsmasq user, and the ownership of the
|
||||||
|
file has to match, to keep systemd >273 happy. */
|
||||||
|
if ((getuid() == 0 && ent_pw && ent_pw->pw_uid != 0 && fchown(fd, ent_pw->pw_uid, ent_pw->pw_gid) == -1) ||
|
||||||
|
!read_write(fd, (unsigned char *)daemon->namebuff, strlen(daemon->namebuff), 0))
|
||||||
err = 1;
|
err = 1;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user