From 81e98199658f90646f562301612e1b3784faf376 Mon Sep 17 00:00:00 2001
From: claudio <claudio@openbsd.org>
Date: Thu, 21 Nov 2024 13:39:07 +0000
Subject: [PATCH] ldapd is also different to other imsg daemons.

OK tb@
---
 usr.sbin/ldapd/imsgev.c | 7 +++++--
 1 file 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;