From 2ce1b32df2c335c53da2713515b84720eaba1413 Mon Sep 17 00:00:00 2001 From: Pawel Jakub Dawidek Date: Sun, 16 Dec 2012 14:24:59 +0000 Subject: [PATCH] Don't add audit record when coredumps are disabled or name cannot be expanded. Discussed with: rwatson Obtained from: WHEEL Systems --- sys/kern/kern_sig.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 475a6278d67..957f3d4dee4 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -3213,16 +3213,10 @@ coredump(struct thread *td) name = expand_name(p->p_comm, cred->cr_uid, p->p_pid, td, compress); if (name == NULL) { PROC_UNLOCK(p); -#ifdef AUDIT - audit_proc_coredump(td, NULL, EINVAL); -#endif return (EINVAL); } if (!do_coredump || (!sugid_coredump && (p->p_flag & P_SUGID) != 0)) { PROC_UNLOCK(p); -#ifdef AUDIT - audit_proc_coredump(td, name, EFAULT); -#endif free(name, M_TEMP); return (EFAULT); } @@ -3238,9 +3232,6 @@ coredump(struct thread *td) limit = (off_t)lim_cur(p, RLIMIT_CORE); if (limit == 0 || racct_get_available(p, RACCT_CORE) == 0) { PROC_UNLOCK(p); -#ifdef AUDIT - audit_proc_coredump(td, name, EFBIG); -#endif free(name, M_TEMP); return (EFBIG); }