}
}
- if (!auth)
+ if (!auth) {
/* not from the kernel, ignore */
+ if (peek) {
+ /* drop the message */
+ r = recvmsg(fd, &msg, 0);
+ if (r < 0)
+ return (errno == EAGAIN || errno == EINTR) ? 0 : -errno;
+ }
+
return 0;
+ }
if (group)
*_group = group;