Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
D
Dnsmasq
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
Dnsmasq
Commits
246a31cd
Commit
246a31cd
authored
Feb 06, 2018
by
Simon Kelley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change ownership of pid file, to keep systemd happy.
parent
83e4b735
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
debian/changelog
debian/changelog
+7
-1
src/dnsmasq.c
src/dnsmasq.c
+8
-1
No files found.
debian/changelog
View file @
246a31cd
...
...
@@ -5,7 +5,13 @@ dnsmasq (2.79-1) unstable; urgency=low
* Fix exit code for dhcp_release6 (closes: #833596)
* 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
...
...
src/dnsmasq.c
View file @
246a31cd
...
...
@@ -541,7 +541,14 @@ int main (int argc, char **argv)
}
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
;
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment