diff options
Diffstat (limited to 'usr.sbin/tcpdump/privsep_fdpass.c')
-rw-r--r-- | usr.sbin/tcpdump/privsep_fdpass.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/tcpdump/privsep_fdpass.c b/usr.sbin/tcpdump/privsep_fdpass.c index bba8d85e4b9..203ba07c324 100644 --- a/usr.sbin/tcpdump/privsep_fdpass.c +++ b/usr.sbin/tcpdump/privsep_fdpass.c @@ -1,4 +1,4 @@ -/* $OpenBSD: privsep_fdpass.c,v 1.6 2008/03/15 16:19:02 deraadt Exp $ */ +/* $OpenBSD: privsep_fdpass.c,v 1.7 2008/03/24 16:11:06 deraadt Exp $ */ /* * Copyright (c) 2002 Matthieu Herrb @@ -46,7 +46,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; @@ -87,7 +87,7 @@ receive_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) warn("%s: recvmsg", __func__); |