svn commit: r244294 - head/sys/kern
Pawel Jakub Dawidek
pjd at FreeBSD.org
Sun Dec 16 14:24:59 UTC 2012
Author: pjd
Date: Sun Dec 16 14:24:59 2012
New Revision: 244294
URL: http://svnweb.freebsd.org/changeset/base/244294
Log:
Don't add audit record when coredumps are disabled or name cannot be expanded.
Discussed with: rwatson
Obtained from: WHEEL Systems
Modified:
head/sys/kern/kern_sig.c
Modified: head/sys/kern/kern_sig.c
==============================================================================
--- head/sys/kern/kern_sig.c Sun Dec 16 14:14:18 2012 (r244293)
+++ head/sys/kern/kern_sig.c Sun Dec 16 14:24:59 2012 (r244294)
@@ -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);
}
More information about the svn-src-all
mailing list