From ffbff10ba180e3dd9050c484692dc3528c53a8c5 Mon Sep 17 00:00:00 2001 From: tron Date: Sun, 8 Mar 2009 21:52:10 +0000 Subject: [PATCH] Use larger buffer for sending and receiving a file descriptor over a UNIX domain socket, based on an example program by Michael van Elst. This fixes support for using milters (Sendmail Mail Filters) with Postfix under at least NetBSD/amd64. --- gnu/dist/postfix/src/util/unix_recv_fd.c | 2 +- gnu/dist/postfix/src/util/unix_send_fd.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/dist/postfix/src/util/unix_recv_fd.c b/gnu/dist/postfix/src/util/unix_recv_fd.c index 7958489c4fe8..8dc8246a8ac1 100644 --- a/gnu/dist/postfix/src/util/unix_recv_fd.c +++ b/gnu/dist/postfix/src/util/unix_recv_fd.c @@ -74,7 +74,7 @@ int unix_recv_fd(int fd) 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); diff --git a/gnu/dist/postfix/src/util/unix_send_fd.c b/gnu/dist/postfix/src/util/unix_send_fd.c index a598b4496211..481f186bf2cc 100644 --- a/gnu/dist/postfix/src/util/unix_send_fd.c +++ b/gnu/dist/postfix/src/util/unix_send_fd.c @@ -76,7 +76,7 @@ int unix_send_fd(int fd, int sendfd) 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));