Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Jan 2001 10:18:13 -0500
From:      Chris Faulhaber <jedgar@fxp.org>
To:        freebsd-audit@FreeBSD.org
Subject:   temp dirs in Makefile.inc1
Message-ID:  <20010111101813.A76735@peitho.fxp.org>

next in thread | raw e-mail | index | archive | help
Currently for an installworld, Makefile.inc1 defines the temporary
directory used as:

TMPDIR?=	/tmp
TMPPID!=	echo $$$$
INSTALLTMP=	${TMPDIR}/install.${TMPPID}

I submitted a patch to marcel (who did not object) to use mktemp(1)
for a more secure directory name.  However, I wanted to run it by
-audit before committing...  Personally, I have been running with
this patch on -current for over a month without problems.

-- 
Chris D. Faulhaber - jedgar@fxp.org - jedgar@FreeBSD.org
--------------------------------------------------------
FreeBSD: The Power To Serve   -   http://www.FreeBSD.org

Index: Makefile.inc1
===================================================================
RCS file: /home/ncvs/src/Makefile.inc1,v
retrieving revision 1.180
diff -u -r1.180 Makefile.inc1
--- Makefile.inc1	2000/12/24 14:58:34	1.180
+++ Makefile.inc1	2001/01/11 15:15:01
@@ -130,9 +130,7 @@
 STRICTTMPPATH=	${WORLDTMP}/usr/sbin:${WORLDTMP}/usr/bin:${WORLDTMP}/usr/games
 TMPPATH=	${STRICTTMPPATH}:${PATH}
 
-TMPDIR?=	/tmp
-TMPPID!=	echo $$$$
-INSTALLTMP=	${TMPDIR}/install.${TMPPID}
+INSTALLTMP!=	mktemp -d -t install
 
 #
 # Building a world goes through the following stages
@@ -295,7 +293,6 @@
 # Installs everything compiled by a 'buildworld'.
 #
 installworld:
-	mkdir -p ${INSTALLTMP}
 	for prog in [ awk cat chflags chmod chown date echo egrep find grep \
 	    install ln make makewhatis mtree mv perl rm sed sh sysctl \
 	    test true uname wc zic; do \


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-audit" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010111101813.A76735>