-/* $OpenBSD: control.c,v 1.28 2018/07/13 08:42:49 reyk Exp $ */
+/* $OpenBSD: control.c,v 1.29 2018/08/05 08:20:54 mestre Exp $ */
/*
* Copyright (c) 2010-2015 Reyk Floeter <reyk@openbsd.org>
/*
* pledge in the control process:
* stdio - for malloc and basic I/O including events.
- * cpath - for managing the control socket.
* unix - for the control socket.
* recvfd - for the proc fd exchange.
* sendfd - for send and receive.
*/
- if (pledge("stdio cpath unix recvfd sendfd", NULL) == -1)
+ if (pledge("stdio unix recvfd sendfd", NULL) == -1)
fatal("pledge");
}
return (0);
}
-void
-control_cleanup(struct control_sock *cs)
-{
- if (cs->cs_name == NULL)
- return;
- event_del(&cs->cs_ev);
- event_del(&cs->cs_evt);
-}
-
/* ARGSUSED */
void
control_accept(int listenfd, short event, void *arg)
-/* $OpenBSD: proc.c,v 1.16 2017/11/04 07:40:31 mlarkin Exp $ */
+/* $OpenBSD: proc.c,v 1.17 2018/08/05 08:20:54 mestre Exp $ */
/*
* Copyright (c) 2010 - 2016 Reyk Floeter <reyk@openbsd.org>
{
struct privsep *ps = p->p_ps;
- if (p->p_id == PROC_CONTROL && ps)
- control_cleanup(&ps->ps_csock);
-
if (p->p_shutdown != NULL)
(*p->p_shutdown)();
-/* $OpenBSD: proc.h,v 1.14 2018/07/15 14:36:54 reyk Exp $ */
+/* $OpenBSD: proc.h,v 1.15 2018/08/05 08:20:54 mestre Exp $ */
/*
* Copyright (c) 2010-2015 Reyk Floeter <reyk@openbsd.org>
};
TAILQ_HEAD(control_socks, control_sock);
-struct {
- struct event ev;
- int fd;
-} control_state;
-
struct ctl_conn {
TAILQ_ENTRY(ctl_conn) entry;
uint8_t flags;
int control_init(struct privsep *, struct control_sock *);
int control_reset(struct control_sock *);
int control_listen(struct control_sock *);
-void control_cleanup(struct control_sock *);
/* log.c */
void log_init(int, int);