summaryrefslogtreecommitdiffstats
path: root/src/dhcpcd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dhcpcd.c')
-rw-r--r--src/dhcpcd.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/dhcpcd.c b/src/dhcpcd.c
index 060f2e93..4c61c6f0 100644
--- a/src/dhcpcd.c
+++ b/src/dhcpcd.c
@@ -2236,9 +2236,16 @@ printpidfile:
dev_start(&ctx);
#ifdef PRIVSEP
- if (ctx.options & DHCPCD_PRIVSEP && ps_dropprivs(&ctx) == -1) {
- logerr("ps_dropprivs");
- goto exit_failure;
+ if (ctx.options & DHCPCD_PRIVSEP) {
+ /*
+ * PSF_CAP_ENTER is not set because the following functions
+ * won't work in it:
+ * getifaddrs(3), gethostname(3), uname(3).
+ */
+ if (ps_dropprivs(&ctx, 0) == -1) {
+ logerr("ps_dropprivs");
+ goto exit_failure;
+ }
}
#endif