summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/relayd/proc.c5
-rw-r--r--usr.sbin/relayd/relayd.c16
-rw-r--r--usr.sbin/relayd/relayd.h5
3 files changed, 13 insertions, 13 deletions
diff --git a/usr.sbin/relayd/proc.c b/usr.sbin/relayd/proc.c
index 08dcafa3f1b..56b17277a81 100644
--- a/usr.sbin/relayd/proc.c
+++ b/usr.sbin/relayd/proc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: proc.c,v 1.32 2016/09/03 14:44:21 reyk Exp $ */
+/* $OpenBSD: proc.c,v 1.33 2016/09/28 12:16:44 reyk Exp $ */
/*
* Copyright (c) 2010 - 2014 Reyk Floeter <reyk@openbsd.org>
@@ -115,7 +115,7 @@ proc_exec(struct privsep *ps, struct privsep_proc *procs, unsigned int nproc,
p = &procs[proc];
/* Update args with process title. */
- nargv[proc_i] = (char *) p->p_title;
+ nargv[proc_i] = (char *)(uintptr_t)p->p_title;
/* Fire children processes. */
for (i = 0; i < ps->ps_instances[p->p_id]; i++) {
@@ -300,7 +300,6 @@ proc_setup(struct privsep *ps, struct privsep_proc *procs, unsigned int nproc)
for (src = 0; src < nproc; src++) {
procs[src].p_ps = ps;
- procs[src].p_env = ps->ps_env;
if (procs[src].p_cb == NULL)
procs[src].p_cb = proc_dispatch_null;
diff --git a/usr.sbin/relayd/relayd.c b/usr.sbin/relayd/relayd.c
index 501f247f087..6abd1ee612c 100644
--- a/usr.sbin/relayd/relayd.c
+++ b/usr.sbin/relayd/relayd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: relayd.c,v 1.161 2016/09/27 21:39:27 bluhm Exp $ */
+/* $OpenBSD: relayd.c,v 1.162 2016/09/28 12:16:44 reyk Exp $ */
/*
* Copyright (c) 2007 - 2016 Reyk Floeter <reyk@openbsd.org>
@@ -410,7 +410,8 @@ parent_shutdown(struct relayd *env)
int
parent_dispatch_pfe(int fd, struct privsep_proc *p, struct imsg *imsg)
{
- struct relayd *env = p->p_env;
+ struct privsep *ps = p->p_ps;
+ struct relayd *env = ps->ps_env;
struct ctl_demote demote;
struct ctl_netroute crt;
u_int v;
@@ -457,8 +458,8 @@ parent_dispatch_pfe(int fd, struct privsep_proc *p, struct imsg *imsg)
int
parent_dispatch_hce(int fd, struct privsep_proc *p, struct imsg *imsg)
{
- struct relayd *env = p->p_env;
- struct privsep *ps = env->sc_ps;
+ struct privsep *ps = p->p_ps;
+ struct relayd *env = ps->ps_env;
struct ctl_script scr;
switch (imsg->hdr.type) {
@@ -481,8 +482,8 @@ parent_dispatch_hce(int fd, struct privsep_proc *p, struct imsg *imsg)
int
parent_dispatch_relay(int fd, struct privsep_proc *p, struct imsg *imsg)
{
- struct relayd *env = p->p_env;
- struct privsep *ps = env->sc_ps;
+ struct privsep *ps = p->p_ps;
+ struct relayd *env = ps->ps_env;
struct ctl_bindany bnd;
int s;
@@ -519,7 +520,8 @@ parent_dispatch_relay(int fd, struct privsep_proc *p, struct imsg *imsg)
int
parent_dispatch_ca(int fd, struct privsep_proc *p, struct imsg *imsg)
{
- struct relayd *env = p->p_env;
+ struct privsep *ps = p->p_ps;
+ struct relayd *env = ps->ps_env;
switch (imsg->hdr.type) {
case IMSG_CFG_DONE:
diff --git a/usr.sbin/relayd/relayd.h b/usr.sbin/relayd/relayd.h
index 78a1f2c5789..71730938b21 100644
--- a/usr.sbin/relayd/relayd.h
+++ b/usr.sbin/relayd/relayd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: relayd.h,v 1.233 2016/09/03 14:44:21 reyk Exp $ */
+/* $OpenBSD: relayd.h,v 1.234 2016/09/28 12:16:44 reyk Exp $ */
/*
* Copyright (c) 2006 - 2016 Reyk Floeter <reyk@openbsd.org>
@@ -1028,10 +1028,9 @@ struct privsep_proc {
struct imsg *);
void (*p_init)(struct privsep *,
struct privsep_proc *);
- void (*p_shutdown)(void);
const char *p_chroot;
struct privsep *p_ps;
- struct relayd *p_env;
+ void (*p_shutdown)(void);
};
struct privsep_fd {