Subject: CVS commit: [netbsd-1-4] syssrc/sys/kern
To: None <>
From: Perry E. Metzger <>
List: source-changes
Date: 07/19/2001 16:36:21
Module Name:	syssrc
Committed By:	perry
Date:		Thu Jul 19 13:36:21 UTC 2001

Modified Files:
	syssrc/sys/kern [netbsd-1-4]: exec_script.c kern_exec.c

Log Message:
Pull-up patch requested by Luke Mewburn.

Original commit message:

	In check_exec(), don't bother checking P_TRACED along with
	MNT_NOSUID, just check MNT_NOSUID to clear the S{U,G}ID bits
	in the attributes for the vnode we're about to exec.

	We now check P_TRACED right before we would actually perform
	the s{u,g}id function in the exec code.

	This closes a race condition between exec of a setuid binary
	and ptrace(2).

To generate a diff of this commit:
cvs rdiff -r1.20.2.1 -r1.20.2.2 syssrc/sys/kern/exec_script.c
cvs rdiff -r1.100.2.3 -r1.100.2.4 syssrc/sys/kern/kern_exec.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.