diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-06-20 13:01:51 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-06-20 16:12:55 +0200 |
commit | a6887cc03e52a3bc47498cf29951aee28601bcfa (patch) | |
tree | 6aa262781f6f0c512ba149052ca8f420a578c5cd /src | |
parent | bb6f071f5ab0d89824a97f9f9128fb2d7b93ebd8 (diff) |
tree-wide: drop MSG_NOSIGNAL flag from recvmsg() invocations
MSG_NOSIGNAL is only defined for sendmsg(), not for recvmsg(), hence
let's drop it's use, in particular as it appears to create problems on
older kernels. See:
https://lists.freedesktop.org/archives/systemd-devel/2018-June/040869.html
Diffstat (limited to 'src')
-rw-r--r-- | src/basic/socket-util.c | 2 | ||||
-rw-r--r-- | src/core/dynamic-user.c | 2 | ||||
-rw-r--r-- | src/coredump/coredump.c | 2 | ||||
-rw-r--r-- | src/libsystemd/sd-bus/bus-socket.c | 4 | ||||
-rw-r--r-- | src/portable/portable.c | 2 |
5 files changed, 6 insertions, 6 deletions
diff --git a/src/basic/socket-util.c b/src/basic/socket-util.c index 69f2c41e9d..a913102e13 100644 --- a/src/basic/socket-util.c +++ b/src/basic/socket-util.c @@ -1058,7 +1058,7 @@ int receive_one_fd(int transport_fd, int flags) { * combination with send_one_fd(). */ - if (recvmsg(transport_fd, &mh, MSG_NOSIGNAL | MSG_CMSG_CLOEXEC | flags) < 0) + if (recvmsg(transport_fd, &mh, MSG_CMSG_CLOEXEC | flags) < 0) return -errno; CMSG_FOREACH(cmsg, &mh) { diff --git a/src/core/dynamic-user.c b/src/core/dynamic-user.c index 270b4eb8fa..7c5111ddf6 100644 --- a/src/core/dynamic-user.c +++ b/src/core/dynamic-user.c @@ -334,7 +334,7 @@ static int dynamic_user_pop(DynamicUser *d, uid_t *ret_uid, int *ret_lock_fd) { /* Read the UID and lock fd that is stored in the storage AF_UNIX socket. This should be called with the lock * on the socket taken. */ - k = recvmsg(d->storage_socket[0], &mh, MSG_DONTWAIT|MSG_NOSIGNAL|MSG_CMSG_CLOEXEC); + k = recvmsg(d->storage_socket[0], &mh, MSG_DONTWAIT|MSG_CMSG_CLOEXEC); if (k < 0) return -errno; diff --git a/src/coredump/coredump.c b/src/coredump/coredump.c index d2b4ba2a21..20a1cbdd45 100644 --- a/src/coredump/coredump.c +++ b/src/coredump/coredump.c @@ -912,7 +912,7 @@ static int process_socket(int fd) { mh.msg_iov = iovec + n_iovec; - n = recvmsg(fd, &mh, MSG_NOSIGNAL|MSG_CMSG_CLOEXEC); + n = recvmsg(fd, &mh, MSG_CMSG_CLOEXEC); if (n < 0) { free(iovec[n_iovec].iov_base); r = log_error_errno(errno, "Failed to receive datagram: %m"); diff --git a/src/libsystemd/sd-bus/bus-socket.c b/src/libsystemd/sd-bus/bus-socket.c index 7303313635..b147a3843a 100644 --- a/src/libsystemd/sd-bus/bus-socket.c +++ b/src/libsystemd/sd-bus/bus-socket.c @@ -533,7 +533,7 @@ static int bus_socket_read_auth(sd_bus *b) { mh.msg_control = &control; mh.msg_controllen = sizeof(control); - k = recvmsg(b->input_fd, &mh, MSG_DONTWAIT|MSG_NOSIGNAL|MSG_CMSG_CLOEXEC); + k = recvmsg(b->input_fd, &mh, MSG_DONTWAIT|MSG_CMSG_CLOEXEC); if (k < 0 && errno == ENOTSOCK) { b->prefer_readv = true; k = readv(b->input_fd, &iov, 1); @@ -1163,7 +1163,7 @@ int bus_socket_read_message(sd_bus *bus) { mh.msg_control = &control; mh.msg_controllen = sizeof(control); - k = recvmsg(bus->input_fd, &mh, MSG_DONTWAIT|MSG_NOSIGNAL|MSG_CMSG_CLOEXEC); + k = recvmsg(bus->input_fd, &mh, MSG_DONTWAIT|MSG_CMSG_CLOEXEC); if (k < 0 && errno == ENOTSOCK) { bus->prefer_readv = true; k = readv(bus->input_fd, &iov, 1); diff --git a/src/portable/portable.c b/src/portable/portable.c index eac0a4d616..eb5daf3b0e 100644 --- a/src/portable/portable.c +++ b/src/portable/portable.c @@ -201,7 +201,7 @@ static int recv_item( assert(ret_name); assert(ret_fd); - n = recvmsg(socket_fd, &mh, MSG_NOSIGNAL|MSG_CMSG_CLOEXEC); + n = recvmsg(socket_fd, &mh, MSG_CMSG_CLOEXEC); if (n < 0) return -errno; |