tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Kernel or userland bug: file descript passing in Postfix
[Re-sent with correct recipient addresses.]
Hello,
it seems that support for "milters" is currently broken in Postfix under at
least NetBSD/amd64 5.0_RC2. "postfix/cleanup" dies with this error message
like this one:
warning: cannot receive milters via service cleanup socket socket
After a lot of debugging and by comparing with a demo program kindly
provided by Michael van Elst I came up with the attached patch for
Postfix which seems to fix the problem.
Is this really a bug in Postfix (in which I case I will commit the patch)
or is it a kernel bug?
Kind regards
--
Matthias Scheler http://zhadum.org.uk/
Index: gnu/dist/postfix/src/util/unix_recv_fd.c
===================================================================
RCS file: /cvsroot/src/gnu/dist/postfix/src/util/unix_recv_fd.c,v
retrieving revision 1.1.1.3
diff -u -r1.1.1.3 unix_recv_fd.c
--- gnu/dist/postfix/src/util/unix_recv_fd.c 30 Aug 2008 10:33:33 -0000
1.1.1.3
+++ gnu/dist/postfix/src/util/unix_recv_fd.c 7 Mar 2009 23:36:44 -0000
@@ -74,7 +74,7 @@
memset((char *) &msg, 0, sizeof(msg)); /* Fix 200512 */
msg.msg_control = control_un.control;
- msg.msg_controllen = CMSG_LEN(sizeof(newfd)); /* Fix 200506 */
+ msg.msg_controllen = sizeof(control_un.control); /* Fix 200506 */
#else
msg.msg_accrights = (char *) &newfd;
msg.msg_accrightslen = sizeof(newfd);
Index: gnu/dist/postfix/src/util/unix_send_fd.c
===================================================================
RCS file: /cvsroot/src/gnu/dist/postfix/src/util/unix_send_fd.c,v
retrieving revision 1.1.1.3
diff -u -r1.1.1.3 unix_send_fd.c
--- gnu/dist/postfix/src/util/unix_send_fd.c 30 Aug 2008 10:33:34 -0000
1.1.1.3
+++ gnu/dist/postfix/src/util/unix_send_fd.c 7 Mar 2009 23:36:44 -0000
@@ -76,7 +76,7 @@
memset((char *) &msg, 0, sizeof(msg)); /* Fix 200512 */
msg.msg_control = control_un.control;
- msg.msg_controllen = CMSG_LEN(sizeof(sendfd)); /* Fix 200506 */
+ msg.msg_controllen = sizeof(control_un.control); /* Fix 200506 */
cmptr = CMSG_FIRSTHDR(&msg);
cmptr->cmsg_len = CMSG_LEN(sizeof(sendfd));
Home |
Main Index |
Thread Index |
Old Index