1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-07 17:17:44 +03:00

audit-util: check correct errno

(cherry picked from commit 190a0953808608b099f9465f9e786e4efe276c26)
(cherry picked from commit c90ae08b0a5f2844504a109f71dcd773c16d8260)
This commit is contained in:
Mike Yuan 2024-08-31 15:42:43 +02:00 committed by Luca Boccassi
parent 7a3b3ad522
commit a3872e60ae

View File

@ -99,7 +99,7 @@ static int try_audit_request(int fd) {
n = recvmsg_safe(fd, &mh, 0);
if (n < 0)
return -errno;
return n;
if (n != NLMSG_LENGTH(sizeof(struct nlmsgerr)))
return -EIO;