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.
This commit is contained in:
parent
ea6a01a6c4
commit
ffbff10ba1
2
gnu/dist/postfix/src/util/unix_recv_fd.c
vendored
2
gnu/dist/postfix/src/util/unix_recv_fd.c
vendored
@ -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);
|
||||
|
2
gnu/dist/postfix/src/util/unix_send_fd.c
vendored
2
gnu/dist/postfix/src/util/unix_send_fd.c
vendored
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user