Skip to content

Commit

Permalink
audit-util: check correct errno
Browse files Browse the repository at this point in the history
(cherry picked from commit 190a0953808608b099f9465f9e786e4efe276c26)
(cherry picked from commit c90ae08b0a5f2844504a109f71dcd773c16d8260)
(cherry picked from commit a3872e6)
(cherry picked from commit 4503a6d)
  • Loading branch information
YHNdnzj authored and bluca committed Sep 11, 2024
1 parent 3adfd9f commit 6dadc4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/basic/audit-util.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,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;

Expand Down

0 comments on commit 6dadc4e

Please sign in to comment.