Bug 16745

Summary: Kernel Makefile doesn't sanitise PATH [PATCH]
Product: Base System Reporter: Bob Bishop <rb>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 3.4-RELEASE   
Hardware: Any   
OS: Any   

Description Bob Bishop 2000-02-16 12:40:01 UTC
	Makefile in /sys/compile/<system> doesn't sanitise
	PATH (cf /usr/src/Makefile).  This can result in wrong
	tools being used.

Fix: Something along the lines of:
	


+PATH=   /sbin:/bin:/usr/sbin:/usr/bin
+
 KERNFORMAT?=   elf

 STD8X16FONT?=  iso--fm0tbZ7VEmBuk2VYFWSeDu4rcRKyvN4CIhVpt03PBsQaSY3V
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

--- /sys/i386/conf/Makefile.i386.orig  Wed Feb 16 12:13:07 2000
+++ /sys/i386/conf/Makefile.i386       Wed Feb 16 12:13:44 2000
@@ -19,6 +19,8 @@
 # Which version of config(8) is required.
 %VERSREQ=      300009
How-To-Repeat: 
	sh
	echo "echo You must be joking" >/tmp/lex
	chmod +x /tmp/lex
	PATH=/tmp:$PATH export PATH
	cd /sys/i386/conf
	config GENERIC
	cd ../../compile GENERIC
	make depend; make
Comment 1 Bob Bishop 2001-05-13 10:50:32 UTC
This problem still applies today in -CURRENT and -STABLE. The fix has
moved, of course...


--
Bob Bishop              (0118) 977 4017  international code +44 118
rb@gid.co.uk        fax (0118) 989 4254
Comment 2 Johan Karlsson freebsd_committer freebsd_triage 2002-09-08 11:57:27 UTC
State Changed
From-To: open->closed

The kernel makefile should not fidle with the path 
it should use the tools it is told to use. 

If it did change the path the buildkernel/installkernel 
targets of src/Makefile.inc1 will not work.