summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ldapd/control.c
diff options
context:
space:
mode:
authorjmatthew <jmatthew@openbsd.org>2015-11-02 06:32:51 +0000
committerjmatthew <jmatthew@openbsd.org>2015-11-02 06:32:51 +0000
commit576ea306f407aa35fb8c824f0219cd945bd2562c (patch)
treecb7b13dd6d01abc5a69b1b24e084d413a6b5bab0 /usr.sbin/ldapd/control.c
parentFix typo: s/DT_JUMPREL/DT_JMPREL/ (diff)
downloadwireguard-openbsd-576ea306f407aa35fb8c824f0219cd945bd2562c.tar.xz
wireguard-openbsd-576ea306f407aa35fb8c824f0219cd945bd2562c.zip
use SOCK_NONBLOCK instead of fcntl
ok dlg@
Diffstat (limited to 'usr.sbin/ldapd/control.c')
-rw-r--r--usr.sbin/ldapd/control.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/usr.sbin/ldapd/control.c b/usr.sbin/ldapd/control.c
index e72139441d5..61a721a81f1 100644
--- a/usr.sbin/ldapd/control.c
+++ b/usr.sbin/ldapd/control.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: control.c,v 1.10 2015/01/16 16:04:38 deraadt Exp $ */
+/* $OpenBSD: control.c,v 1.11 2015/11/02 06:32:51 jmatthew Exp $ */
/*
* Copyright (c) 2010 Martin Hedenfalk <martin@bzero.se>
@@ -55,7 +55,7 @@ control_init(struct control_sock *cs)
if (cs->cs_name == NULL)
return;
- if ((fd = socket(AF_UNIX, SOCK_STREAM, 0)) == -1)
+ if ((fd = socket(AF_UNIX, SOCK_STREAM | SOCK_NONBLOCK, 0)) == -1)
fatal("control_init: socket");
bzero(&sun, sizeof(sun));
@@ -89,7 +89,6 @@ control_init(struct control_sock *cs)
fatal("control_init: chmod");
}
- fd_nonblock(fd);
cs->cs_fd = fd;
}
@@ -149,8 +148,6 @@ control_accept(int listenfd, short event, void *arg)
return;
}
- fd_nonblock(connfd);
-
if ((c = calloc(1, sizeof(*c))) == NULL) {
log_warn("control_accept");
close(connfd);