Date: Sat, 6 Oct 2012 19:23:45 +0000 (UTC) From: Andriy Gapon <avg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241281 - head/sys/kern Message-ID: <201210061923.q96JNjgQ024623@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: avg Date: Sat Oct 6 19:23:44 2012 New Revision: 241281 URL: http://svn.freebsd.org/changeset/base/241281 Log: ktrace/kern_exec: check p_tracecred instead of p_cred .. when deciding whether to continue tracing across suid/sgid exec. Otherwise if root ktrace-d an unprivileged process and the processed exec-ed a suid program, then tracing didn't continue across exec. Reviewed by: bde, kib MFC after: 22 days Modified: head/sys/kern/kern_exec.c Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Sat Oct 6 19:19:32 2012 (r241280) +++ head/sys/kern/kern_exec.c Sat Oct 6 19:23:44 2012 (r241281) @@ -691,7 +691,8 @@ interpret: setsugid(p); #ifdef KTRACE - if (priv_check_cred(oldcred, PRIV_DEBUG_DIFFCRED, 0)) + if (p->p_tracecred != NULL && + priv_check_cred(p->p_tracecred, PRIV_DEBUG_DIFFCRED, 0)) ktrprocexec(p, &tracecred, &tracevp); #endif /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210061923.q96JNjgQ024623>