-/* $OpenBSD: proc.c,v 1.13 2014/05/06 06:40:03 jsg Exp $ */
+/* $OpenBSD: proc.c,v 1.14 2014/05/08 13:08:48 blambert Exp $ */
/*
* Copyright (c) 2010 - 2014 Reyk Floeter <reyk@openbsd.org>
struct privsep_proc *procs, u_int nproc,
void (*init)(struct privsep *, struct privsep_proc *, void *), void *arg)
{
- pid_t pid;
- struct passwd *pw;
- const char *root;
- u_int n;
+ pid_t pid;
+ struct passwd *pw;
+ const char *root;
+ struct control_sock *rcs;
+ u_int n;
if (ps->ps_noaction)
return (0);
if (p->p_id == PROC_CONTROL && ps->ps_instance == 0) {
if (control_init(ps, &ps->ps_csock) == -1)
fatalx(p->p_title);
+ TAILQ_FOREACH(rcs, &ps->ps_rcsocks, cs_entry)
+ if (control_init(ps, rcs) == -1)
+ fatalx(p->p_title);
}
/* Change root directory */
TAILQ_INIT(&ctl_conns);
if (control_listen(&ps->ps_csock) == -1)
fatalx(p->p_title);
+ TAILQ_FOREACH(rcs, &ps->ps_rcsocks, cs_entry)
+ if (control_listen(rcs) == -1)
+ fatalx(p->p_title);
}
if (init != NULL)
-/* $OpenBSD: relayd.c,v 1.122 2014/04/22 08:04:23 reyk Exp $ */
+/* $OpenBSD: relayd.c,v 1.123 2014/05/08 13:08:48 blambert Exp $ */
/*
* Copyright (c) 2007 - 2014 Reyk Floeter <reyk@openbsd.org>
relayd_env = env;
env->sc_ps = ps;
ps->ps_env = env;
+log_warnx("batman");
+ TAILQ_INIT(&ps->ps_rcsocks);
+log_warnx("robin");
env->sc_conffile = conffile;
env->sc_opts = opts;
-/* $OpenBSD: relayd.h,v 1.178 2014/05/04 16:38:19 reyk Exp $ */
+/* $OpenBSD: relayd.h,v 1.179 2014/05/08 13:08:48 blambert Exp $ */
/*
* Copyright (c) 2006 - 2014 Reyk Floeter <reyk@openbsd.org>
int cs_fd;
int cs_restricted;
void *cs_env;
+
+ TAILQ_ENTRY(control_sock) cs_entry;
};
+TAILQ_HEAD(control_socks, control_sock);
struct {
struct event ev;
u_int ps_instance;
struct control_sock ps_csock;
+ struct control_socks ps_rcsocks;
/* Event and signal handlers */
struct event ps_evsigint;