summaryrefslogtreecommitdiffstats
path: root/src/privsep-root.h
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2020-06-05 14:12:23 +0100
committerRoy Marples <roy@marples.name>2020-06-05 14:12:23 +0100
commit59c952ac3db05d7ec0a8c275b3163fde32a7fade (patch)
treeec2da8c54d57a45b555cd0d0ed5c5c7485676ed3 /src/privsep-root.h
parentbbc8b10a5aa9e0f8d72be2a103619a1aeb0bb933 (diff)
downloaddhcpcd-59c952ac3db05d7ec0a8c275b3163fde32a7fade.tar.xz
Linux: make resource limits work by using getifaddrs over privsep
Diffstat (limited to 'src/privsep-root.h')
-rw-r--r--src/privsep-root.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/privsep-root.h b/src/privsep-root.h
index 371431bf..1de284bf 100644
--- a/src/privsep-root.h
+++ b/src/privsep-root.h
@@ -31,6 +31,10 @@
#include "if.h"
+#if defined(PRIVSEP) && (defined(HAVE_CAPSICUM) || defined(__linux__))
+#define PRIVSEP_GETIFADDRS
+#endif
+
pid_t ps_root_start(struct dhcpcd_ctx *ctx);
int ps_root_stop(struct dhcpcd_ctx *ctx);
@@ -45,7 +49,9 @@ ssize_t ps_root_writefile(struct dhcpcd_ctx *, const char *, mode_t,
const void *, size_t);
ssize_t ps_root_script(struct dhcpcd_ctx *, const void *, size_t);
int ps_root_getauthrdm(struct dhcpcd_ctx *, uint64_t *);
+#ifdef PRIVSEP_GETIFADDRS
int ps_root_getifaddrs(struct dhcpcd_ctx *, struct ifaddrs **);
+#endif
ssize_t ps_root_os(struct ps_msghdr *, struct msghdr *, void **, size_t *);
#if defined(BSD) || defined(__sun)