summaryrefslogtreecommitdiffstats
path: root/src/dhcpcd.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2020-09-11 12:21:07 +0100
committerRoy Marples <roy@marples.name>2020-09-11 12:21:07 +0100
commitcef2857d4ddd8524a6737e230d7fb130b6799169 (patch)
tree0009918aaf449fa1cd22c3a9d229f34ebb1c1344 /src/dhcpcd.c
parent870f165161f4436421e105e104db3813064120cf (diff)
downloaddhcpcd-cef2857d4ddd8524a6737e230d7fb130b6799169.tar.xz
dhcpcd: avoid privsep errors if we error locking the pidfile
Should not happen on the happy path, but if it does, tidy the resultant errors.
Diffstat (limited to 'src/dhcpcd.c')
-rw-r--r--src/dhcpcd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/dhcpcd.c b/src/dhcpcd.c
index ba0c905a..f80d293a 100644
--- a/src/dhcpcd.c
+++ b/src/dhcpcd.c
@@ -2336,6 +2336,10 @@ printpidfile:
ctx.options |= DHCPCD_STARTED;
if ((pid = pidfile_lock(ctx.pidfile)) != 0) {
logerr("%s: pidfile_lock %d", __func__, pid);
+#ifdef PRIVSEP
+ /* privsep has not started ... */
+ ctx.options &= ~DHCPCD_PRIVSEP;
+#endif
goto exit_failure;
}
#endif