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

Function audit_syscall_exit

freebsd/security/audit/audit.c:712–732  ·  view source on GitHub ↗

* audit_syscall_exit() is called from the return of every system call, or in * the event of exit1(), during the execution of exit1(). It is responsible * for committing the audit record, if any, along with return condition. */

Source from the content-addressed store, hash-verified

710 * for committing the audit record, if any, along with return condition.
711 */
712void
713audit_syscall_exit(int error, struct thread *td)
714{
715 int retval;
716
717 /*
718 * Commit the audit record as desired; once we pass the record into
719 * audit_commit(), the memory is owned by the audit subsystem. The
720 * return value from the system call is stored on the user thread.
721 * If there was an error, the return value is set to -1, imitating
722 * the behavior of the cerror routine.
723 */
724 if (error)
725 retval = -1;
726 else
727 retval = td->td_retval[0];
728
729 audit_commit(td->td_ar, error, retval);
730 td->td_ar = NULL;
731 td->td_pflags &= ~TDP_AUDITREC;
732}
733
734void
735audit_cred_copy(struct ucred *src, struct ucred *dest)

Callers

nothing calls this directly

Calls 1

audit_commitFunction · 0.85

Tested by

no test coverage detected