Merge pull request #15504 from poettering/cmsg-find-pure

just the recvmsg_safe() stuff from #15457
This commit is contained in:
Lennart Poettering
2020-04-23 17:28:19 +02:00
committed by GitHub
16 changed files with 129 additions and 91 deletions
+4 -5
View File
@@ -925,12 +925,11 @@ int ask_password_agent(
msghdr.msg_control = &control;
msghdr.msg_controllen = sizeof(control);
n = recvmsg(socket_fd, &msghdr, 0);
n = recvmsg_safe(socket_fd, &msghdr, 0);
if (IN_SET(n, -EAGAIN, -EINTR))
continue;
if (n < 0) {
if (IN_SET(errno, EAGAIN, EINTR))
continue;
r = -errno;
r = (int) n;
goto finish;
}