diff options
author | csjp <csjp@FreeBSD.org> | 2007-10-24 00:14:19 +0000 |
---|---|---|
committer | csjp <csjp@FreeBSD.org> | 2007-10-24 00:14:19 +0000 |
commit | 76f4445c43bce981b8fc1ed851fbe47b1c2727c3 (patch) | |
tree | 58689ede929808c1d1b3fd1d7fc4360b5b6f6f49 | |
parent | 34260afd908f38eec99b1fc77e6fe18bf6523409 (diff) | |
download | FreeBSD-src-76f4445c43bce981b8fc1ed851fbe47b1c2727c3.zip FreeBSD-src-76f4445c43bce981b8fc1ed851fbe47b1c2727c3.tar.gz |
Move where we audit the PID argument such that we unconditionally
audit it at the beginning of the syscall. This fixes a problem
where the user supplies an invalid process ID which is > 0 which
results in the PID argument not being audited.
Obtained from: TrustedBSD Project
MFC after: 1 week
-rw-r--r-- | sys/kern/kern_sig.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index e4a60e7..694d145 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -1693,6 +1693,7 @@ kill(td, uap) int error; AUDIT_ARG(signum, uap->signum); + AUDIT_ARG(pid, uap->pid); if ((u_int)uap->signum > _SIG_MAXSIG) return (EINVAL); @@ -1709,7 +1710,6 @@ kill(td, uap) PROC_UNLOCK(p); return (error); } - AUDIT_ARG(pid, uap->pid); switch (uap->pid) { case -1: /* broadcast signal */ return (killpg1(td, uap->signum, 0, 1)); |