From: Roy Marples Date: Fri, 11 Sep 2020 11:21:07 +0000 (+0100) Subject: dhcpcd: avoid privsep errors if we error locking the pidfile X-Git-Tag: v9.3.0~45 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cef2857d4ddd8524a6737e230d7fb130b6799169;p=thirdparty%2Fdhcpcd.git 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. --- 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