diff options
author | wsalamon <wsalamon@FreeBSD.org> | 2006-02-06 00:28:50 +0000 |
---|---|---|
committer | wsalamon <wsalamon@FreeBSD.org> | 2006-02-06 00:28:50 +0000 |
commit | c41a4863641aed4c7fe253f2310f0b2535348e65 (patch) | |
tree | 5d38c78144fae0226969fa2cbb103c737788b404 /sys/kern/kern_fork.c | |
parent | 88c7ad2392d24cb7c203deabadb587dd6abadd16 (diff) | |
download | FreeBSD-src-c41a4863641aed4c7fe253f2310f0b2535348e65.zip FreeBSD-src-c41a4863641aed4c7fe253f2310f0b2535348e65.tar.gz |
Audit the args to rfork(), and the child PID for all fork system calls.
Obtained from: TrustedBSD Project
Approved by: rwatson (mentor)
Diffstat (limited to 'sys/kern/kern_fork.c')
-rw-r--r-- | sys/kern/kern_fork.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index 5a2c042..eb43e1d 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -138,6 +138,7 @@ rfork(td, uap) if ((uap->flags & RFKERNELONLY) != 0) return (EINVAL); + AUDIT_ARG(fflags, uap->flags); error = fork1(td, uap->flags, 0, &p2); if (error == 0) { td->td_retval[0] = p2 ? p2->p_pid : 0; @@ -400,6 +401,7 @@ again: p2 = newproc; p2->p_state = PRS_NEW; /* protect against others */ p2->p_pid = trypid; + AUDIT_ARG(pid, p2->p_pid); LIST_INSERT_HEAD(&allproc, p2, p_list); LIST_INSERT_HEAD(PIDHASH(p2->p_pid), p2, p_hash); sx_xunlock(&allproc_lock); |