summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorFlorian Obser <florian@cvs.openbsd.org>2019-03-15 16:46:26 +0000
committerFlorian Obser <florian@cvs.openbsd.org>2019-03-15 16:46:26 +0000
commit17fe9c65d7488e4d7c74f4a4449c1821864b14b2 (patch)
treed2c93063ff2b2ed5215fd8fcfe01fec39085a03a /usr.sbin
parent2b73a48ea09d6cdee3eb56e5bd157f6f40159375 (diff)
Do not accept a control socket if we already have one.
OK pamela
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/rad/frontend.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/rad/frontend.c b/usr.sbin/rad/frontend.c
index fc2cca0b6b6..b25cd3dc3a7 100644
--- a/usr.sbin/rad/frontend.c
+++ b/usr.sbin/rad/frontend.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: frontend.c,v 1.24 2019/03/12 18:47:57 pamela Exp $ */
+/* $OpenBSD: frontend.c,v 1.25 2019/03/15 16:46:25 florian Exp $ */
/*
* Copyright (c) 2018 Florian Obser <florian@openbsd.org>
@@ -470,6 +470,9 @@ frontend_dispatch_main(int fd, short event, void *bula)
frontend_startup();
break;
case IMSG_CONTROLFD:
+ if (control_state.fd != -1)
+ fatalx("%s: received unexpected controlsock",
+ __func__);
if ((fd = imsg.fd) == -1)
fatalx("%s: expected to receive imsg "
"control fd but didn't receive any",