summaryrefslogtreecommitdiff
path: root/usr.sbin/ldpd/control.c
diff options
context:
space:
mode:
authorRicardo Mestre <mestre@cvs.openbsd.org>2020-06-22 15:09:35 +0000
committerRicardo Mestre <mestre@cvs.openbsd.org>2020-06-22 15:09:35 +0000
commit121780d2e5da84944a88eadf7a0f3e07b21f60aa (patch)
tree68d68cc4cb05240068e52c5cf104bd87b08db96b /usr.sbin/ldpd/control.c
parent7040d495c47b70c1f4fb8c87b373603d299d65a4 (diff)
On my previous commit I made the wrong assumption that the control socket was
being unlink(2)ed from the main proc so I removed "cpath" from the pledge(2) on the ldpe proc but actually the socket was unlink(2)ed from here, this means the daemon would crash on exit due to pledge(2) not having "cpath" permissions anymore. Finish the job by just not deleting the socket at all during control_cleanup(), which keeps the control program still working without issues but more importantly prevents the crash during exit, sorry about that. Crash reported by wlund at iki.fi OK deraadt@ claudio@ remi@
Diffstat (limited to 'usr.sbin/ldpd/control.c')
-rw-r--r--usr.sbin/ldpd/control.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/ldpd/control.c b/usr.sbin/ldpd/control.c
index fe0eebdbea6..5c598cd1917 100644
--- a/usr.sbin/ldpd/control.c
+++ b/usr.sbin/ldpd/control.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: control.c,v 1.29 2017/03/03 23:30:57 renato Exp $ */
+/* $OpenBSD: control.c,v 1.30 2020/06/22 15:09:34 mestre Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -98,11 +98,10 @@ control_listen(void)
}
void
-control_cleanup(char *path)
+control_cleanup(void)
{
accept_del(control_fd);
close(control_fd);
- unlink(path);
}
/* ARGSUSED */