diff options
| author | Roy Marples <roy@marples.name> | 2020-09-11 12:21:07 +0100 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2020-09-11 12:21:07 +0100 |
| commit | cef2857d4ddd8524a6737e230d7fb130b6799169 (patch) | |
| tree | 0009918aaf449fa1cd22c3a9d229f34ebb1c1344 /src/dhcpcd.c | |
| parent | 870f165161f4436421e105e104db3813064120cf (diff) | |
| download | dhcpcd-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.c | 4 |
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 |
