Revert "tree-wide: Always use recvmsg with MSG_CMSG_CLOEXEC"

This reverts commit d6d810fbf8.

It's apparently not OK to pass MSG_CMSG_CLOEXEC to recvmsg() of raw
sockets.
This commit is contained in:
Lennart Poettering
2015-02-12 11:45:39 +01:00
parent d01efa0744
commit a38d99451f
9 changed files with 10 additions and 10 deletions
+2 -2
View File
@@ -1431,7 +1431,7 @@ static int socket_recv_message(int fd, struct iovec *iov, uint32_t *_group, bool
assert(fd >= 0);
assert(iov);
r = recvmsg(fd, &msg, MSG_TRUNC | MSG_CMSG_CLOEXEC | (peek ? MSG_PEEK : 0));
r = recvmsg(fd, &msg, MSG_TRUNC | (peek ? MSG_PEEK : 0));
if (r < 0) {
/* no data */
if (errno == ENOBUFS)
@@ -1467,7 +1467,7 @@ static int socket_recv_message(int fd, struct iovec *iov, uint32_t *_group, bool
/* not from the kernel, ignore */
if (peek) {
/* drop the message */
r = recvmsg(fd, &msg, MSG_CMSG_CLOEXEC);
r = recvmsg(fd, &msg, 0);
if (r < 0)
return (errno == EAGAIN || errno == EINTR) ? 0 : -errno;
}