diff options
Diffstat (limited to 'libexec/ftpd/monitor_fdpass.c')
-rw-r--r-- | libexec/ftpd/monitor_fdpass.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libexec/ftpd/monitor_fdpass.c b/libexec/ftpd/monitor_fdpass.c index 94d116eadb6..f4923a1267a 100644 --- a/libexec/ftpd/monitor_fdpass.c +++ b/libexec/ftpd/monitor_fdpass.c @@ -1,4 +1,4 @@ -/* $OpenBSD: monitor_fdpass.c,v 1.3 2008/03/15 16:19:02 deraadt Exp $ */ +/* $OpenBSD: monitor_fdpass.c,v 1.4 2008/03/24 16:11:00 deraadt Exp $ */ /* * Copyright (c) 2002 Matthieu Herrb @@ -44,7 +44,7 @@ send_fd(int sock, int fd) if (fd >= 0) { msg.msg_control = (caddr_t)&cmsgbuf.buf; - msg.msg_controllen = CMSG_LEN(sizeof(int)); + msg.msg_controllen = sizeof(cmsgbuf.buf); cmsg = CMSG_FIRSTHDR(&msg); cmsg->cmsg_len = CMSG_LEN(sizeof(int)); cmsg->cmsg_level = SOL_SOCKET; @@ -85,7 +85,7 @@ recv_fd(int sock) msg.msg_iov = &vec; msg.msg_iovlen = 1; msg.msg_control = &cmsgbuf.buf; - msg.msg_controllen = CMSG_LEN(sizeof(int)); + msg.msg_controllen = sizeof(cmsgbuf.buf); if ((n = recvmsg(sock, &msg, 0)) == -1) syslog(LOG_WARNING, "recv_fd: recvmsg(%d): %m", sock); |