From 43e08aea6e194b15195220288a8204aff9263fe2 Mon Sep 17 00:00:00 2001 From: Mike Yuan Date: Tue, 27 Jan 2026 19:01:18 +0100 Subject: [PATCH] sd-bus/bus-socket: restore recvmsg_safe() during auth At auth stage we reject any fds, hence either way the connection would fail. Let's play it safe and check for MSG_(C)TRUNC still. --- src/libsystemd/sd-bus/bus-socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libsystemd/sd-bus/bus-socket.c b/src/libsystemd/sd-bus/bus-socket.c index 45f74cc7c7..e1ef6b8189 100644 --- a/src/libsystemd/sd-bus/bus-socket.c +++ b/src/libsystemd/sd-bus/bus-socket.c @@ -657,7 +657,7 @@ static int bus_socket_read_auth(sd_bus *b) { .msg_controllen = sizeof(control), }; - k = RET_NERRNO(recvmsg(b->input_fd, &mh, MSG_DONTWAIT|MSG_CMSG_CLOEXEC)); + k = recvmsg_safe(b->input_fd, &mh, MSG_DONTWAIT|MSG_CMSG_CLOEXEC); if (k == -ENOTSOCK) { b->prefer_readv = true; k = readv(b->input_fd, &iov, 1);