-/* $OpenBSD: control.c,v 1.8 2017/01/17 22:10:56 krw Exp $ */
+/* $OpenBSD: control.c,v 1.9 2018/08/05 08:16:24 mestre Exp $ */
/*
* Copyright (c) 2010-2016 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.
*/
- if (pledge("stdio cpath unix recvfd", NULL) == -1)
+ if (pledge("stdio unix recvfd", 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);
- (void)unlink(cs->cs_name);
-}
-
/* ARGSUSED */
void
control_accept(int listenfd, short event, void *arg)
-/* $OpenBSD: proc.c,v 1.12 2017/05/29 12:56:26 benno Exp $ */
+/* $OpenBSD: proc.c,v 1.13 2018/08/05 08:16:24 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.6 2017/01/09 14:49:22 reyk Exp $ */
+/* $OpenBSD: proc.h,v 1.7 2018/08/05 08:16:24 mestre Exp $ */
/*
* Copyright (c) 2010-2015 Reyk Floeter <reyk@openbsd.org>
/* control.c */
int control_init(struct privsep *, struct control_sock *);
int control_listen(struct control_sock *);
-void control_cleanup(struct control_sock *);
struct ctl_conn
*control_connbyfd(int);
void control(struct privsep *, struct privsep_proc *);