# HG changeset patch # User Roy Marples # Date 1599823267 -3600 # Node ID 840cdf8beeb89fdafc138c637ec0c1b0875c2729 # Parent d976db099a39d2fe2b3eda59a015215162c752c9 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 -r d976db099a39 -r 840cdf8beeb8 src/dhcpcd.c --- a/src/dhcpcd.c Sun Sep 06 15:27:28 2020 +0100 +++ b/src/dhcpcd.c Fri Sep 11 12:21:07 2020 +0100 @@ -2336,6 +2336,10 @@ 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