-/* $OpenBSD: control.c,v 1.43 2018/06/17 18:19:59 rob Exp $ */
+/* $OpenBSD: control.c,v 1.44 2018/08/05 09:33:13 mestre Exp $ */
/*
* Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org>
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.24 2017/05/29 12:56:26 benno Exp $ */
+/* $OpenBSD: proc.c,v 1.25 2018/08/05 09:33:13 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: snmpd.c,v 1.38 2018/04/15 11:57:29 mpf Exp $ */
+/* $OpenBSD: snmpd.c,v 1.39 2018/08/05 09:33:13 mestre Exp $ */
/*
* Copyright (c) 2007, 2008, 2012 Reyk Floeter <reyk@openbsd.org>
proc_connect(ps);
- if (pledge("stdio rpath cpath dns id proc sendfd exec", NULL) == -1)
+ if (pledge("stdio rpath dns sendfd proc exec id", NULL) == -1)
fatal("pledge");
event_dispatch();
{
proc_kill(&env->sc_ps);
- if (env->sc_ps.ps_csock.cs_name != NULL)
- (void)unlink(env->sc_ps.ps_csock.cs_name);
-
free(env);
log_info("terminating");
-/* $OpenBSD: snmpd.h,v 1.79 2018/07/31 11:01:29 claudio Exp $ */
+/* $OpenBSD: snmpd.h,v 1.80 2018/08/05 09:33:13 mestre Exp $ */
/*
* Copyright (c) 2007, 2008, 2012 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 *);
/* parse.y */
struct snmpd *parse_config(const char *, u_int);