MCPcopy Create free account
hub / github.com/F-Stack/f-stack / audit_pipe_poll

Function audit_pipe_poll

freebsd/security/audit/audit_pipe.c:982–1001  ·  view source on GitHub ↗

* Audit pipe poll. */

Source from the content-addressed store, hash-verified

980 * Audit pipe poll.
981 */
982static int
983audit_pipe_poll(struct cdev *dev, int events, struct thread *td)
984{
985 struct audit_pipe *ap;
986 int error, revents;
987
988 revents = 0;
989 error = devfs_get_cdevpriv((void **)&ap);
990 if (error != 0)
991 return (error);
992 if (events & (POLLIN | POLLRDNORM)) {
993 AUDIT_PIPE_LOCK(ap);
994 if (TAILQ_FIRST(&ap->ap_queue) != NULL)
995 revents |= events & (POLLIN | POLLRDNORM);
996 else
997 selrecord(td, &ap->ap_selinfo);
998 AUDIT_PIPE_UNLOCK(ap);
999 }
1000 return (revents);
1001}
1002
1003/*
1004 * Audit pipe kqfilter.

Callers

nothing calls this directly

Calls 1

selrecordFunction · 0.85

Tested by

no test coverage detected