* 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. */
| 710 | * for committing the audit record, if any, along with return condition. |
| 711 | */ |
| 712 | void |
| 713 | audit_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 | |
| 734 | void |
| 735 | audit_cred_copy(struct ucred *src, struct ucred *dest) |
nothing calls this directly
no test coverage detected