summaryrefslogtreecommitdiffstats
path: root/src/privsep.h
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2020-09-19 18:58:52 +0100
committerRoy Marples <roy@marples.name>2020-09-19 18:58:52 +0100
commit7a83026997582f5ec23a292dd0b0a4248bc1c141 (patch)
tree488c8a9cb35fa67cf0543ad77deeb0a0952bb4bc /src/privsep.h
parent8f78bde8042dace0e0330a58d430a0c7c8a32199 (diff)
downloaddhcpcd-7a83026997582f5ec23a292dd0b0a4248bc1c141.tar.xz
privsep: Fold capsicum and pledge entry points into ps_entersandbox
Diffstat (limited to 'src/privsep.h')
-rw-r--r--src/privsep.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/privsep.h b/src/privsep.h
index c7895432..8d73af0e 100644
--- a/src/privsep.h
+++ b/src/privsep.h
@@ -92,7 +92,6 @@
#define IN_PRIVSEP_SE(ctx) \
(((ctx)->options & (DHCPCD_PRIVSEP | DHCPCD_FORKED)) == DHCPCD_PRIVSEP)
-
#if defined(PRIVSEP) && defined(HAVE_CAPSICUM)
#define PRIVSEP_RIGHTS
#endif
@@ -168,6 +167,7 @@ TAILQ_HEAD(ps_process_head, ps_process);
int ps_init(struct dhcpcd_ctx *);
int ps_start(struct dhcpcd_ctx *);
int ps_stop(struct dhcpcd_ctx *);
+int ps_entersandbox(const char *);
int ps_mastersandbox(struct dhcpcd_ctx *);
int ps_unrollmsg(struct msghdr *, struct ps_msghdr *, const void *, size_t);
@@ -185,6 +185,7 @@ ssize_t ps_recvpsmsg(struct dhcpcd_ctx *, int,
/* Internal privsep functions. */
int ps_setbuf_fdpair(int []);
+
#ifdef PRIVSEP_RIGHTS
int ps_rights_limit_ioctl(int);
int ps_rights_limit_fd_fctnl(int);
@@ -192,6 +193,7 @@ int ps_rights_limit_fd_rdonly(int);
int ps_rights_limit_fd(int);
int ps_rights_limit_fdpair(int []);
#endif
+
pid_t ps_dostart(struct dhcpcd_ctx * ctx,
pid_t *priv_pid, int *priv_fd,
void (*recv_msg)(void *), void (*recv_unpriv_msg),