summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2024-11-21 13:39:08 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2024-11-21 13:39:08 +0000
commit564519530c7a6156e72ed55d3e039f465bf9d0db (patch)
treeccbd43641c23618ec1078d2cb970c587f6937b91 /usr.sbin
parent75acb3f0c98cf8b062366289fe5cceb64869b33b (diff)
ldapd is also different to other imsg daemons.
OK tb@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ldapd/imsgev.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/ldapd/imsgev.c b/usr.sbin/ldapd/imsgev.c
index 50383c76e0a..40a02d22edf 100644
--- a/usr.sbin/ldapd/imsgev.c
+++ b/usr.sbin/ldapd/imsgev.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: imsgev.c,v 1.12 2024/11/21 13:25:56 claudio Exp $ */
+/* $OpenBSD: imsgev.c,v 1.13 2024/11/21 13:39:07 claudio Exp $ */
/*
* Copyright (c) 2009 Eric Faurot <eric@openbsd.org>
@@ -27,6 +27,7 @@
#include <unistd.h>
#include "imsgev.h"
+#include "log.h"
void imsgev_add(struct imsgev *);
void imsgev_dispatch(int, short, void *);
@@ -37,7 +38,9 @@ imsgev_init(struct imsgev *iev, int fd, void *data,
void (*callback)(struct imsgev *, int, struct imsg *),
void (*needfd)(struct imsgev *))
{
- imsgbuf_init(&iev->ibuf, fd);
+ if (imsgbuf_init(&iev->ibuf, fd) == -1)
+ fatal("imsgbuf_init");
+ imsgbuf_allow_fdpass(&iev->ibuf);
iev->terminate = 0;
iev->data = data;