previous commit mismanaged the control fd
authorderaadt <deraadt@openbsd.org>
Tue, 23 Feb 2021 14:27:16 +0000 (14:27 +0000)
committerderaadt <deraadt@openbsd.org>
Tue, 23 Feb 2021 14:27:16 +0000 (14:27 +0000)
ok claudio

usr.sbin/rad/control.c

index d8e0ba2..d252596 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: control.c,v 1.6 2021/01/19 16:54:00 florian Exp $     */
+/*     $OpenBSD: control.c,v 1.7 2021/02/23 14:27:16 deraadt Exp $     */
 
 /*
  * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -106,7 +106,7 @@ control_listen(int fd)
        if (control_state.fd != -1)
                fatalx("%s: received unexpected controlsock", __func__);
 
-       control_state.fd = -1;
+       control_state.fd = fd;
        if (listen(control_state.fd, CONTROL_BACKLOG) == -1) {
                log_warn("%s: listen", __func__);
                return (-1);