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.
This commit is contained in:
Mike Yuan
2026-01-28 03:07:01 +01:00
parent 149a8e6306
commit 43e08aea6e
+1 -1
View File
@@ -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);