summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/smtpctl.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2024-11-21 13:42:23 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2024-11-21 13:42:23 +0000
commit8a40d1224b99e08385e16451a62564abcf81f42e (patch)
treead33c6f93808f938b66821a989e73371fed37bca /usr.sbin/smtpd/smtpctl.c
parente258c9b166ad18f72b4de6aceaf48ecad9427434 (diff)
In smtpd enable fdpassing on all imsgbufs apart from the one in mproc.c
that was specially handled before. On the control socket fdpassing needs to be enabled when a IMSG_CTL_SMTP_SESSION message is received. OK tb@
Diffstat (limited to 'usr.sbin/smtpd/smtpctl.c')
-rw-r--r--usr.sbin/smtpd/smtpctl.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/smtpd/smtpctl.c b/usr.sbin/smtpd/smtpctl.c
index fb3d3f3714b..faecc946067 100644
--- a/usr.sbin/smtpd/smtpctl.c
+++ b/usr.sbin/smtpd/smtpctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smtpctl.c,v 1.175 2024/11/21 13:26:25 claudio Exp $ */
+/* $OpenBSD: smtpctl.c,v 1.176 2024/11/21 13:42:22 claudio Exp $ */
/*
* Copyright (c) 2013 Eric Faurot <eric@openbsd.org>
@@ -118,7 +118,9 @@ srv_connect(void)
}
ibuf = xcalloc(1, sizeof(struct imsgbuf));
- imsgbuf_init(ibuf, ctl_sock);
+ if (imsgbuf_init(ibuf, ctl_sock) == -1)
+ err(1, "imsgbuf_init");
+ imsgbuf_allow_fdpass(ibuf);
return (1);
}