Date: Fri, 12 Jan 2001 18:57:33 -0800 From: Kris Kennaway <kris@FreeBSD.ORG> To: Chris Faulhaber <jedgar@fxp.org> Cc: freebsd-audit@FreeBSD.ORG Subject: Re: temp dirs in Makefile.inc1 Message-ID: <20010112185733.C25168@citusc.usc.edu> In-Reply-To: <20010111101813.A76735@peitho.fxp.org>; from jedgar@fxp.org on Thu, Jan 11, 2001 at 10:18:13AM -0500 References: <20010111101813.A76735@peitho.fxp.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--1ccMZA6j1vT5UqiK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jan 11, 2001 at 10:18:13AM -0500, Chris Faulhaber wrote: > 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. Doesn't it have problems cleaning up the temporary directory once finished? It also creates the directory when it's not needed (e.g. for other make targets) because the creation is done at an earlier point. I've been running with this almost identical patch for a few months, which works, but I don't like the way it does it. Kris Index: Makefile.inc1 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /mnt/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/13 00:26:27 @@ -130,9 +130,7 @@ STRICTTMPPATH=3D ${WORLDTMP}/usr/sbin:${WORLDTMP}/usr/bin:${WORLDTMP}/usr/= games TMPPATH=3D ${STRICTTMPPATH}:${PATH} =20 -TMPDIR?=3D /tmp -TMPPID!=3D echo $$$$ -INSTALLTMP=3D ${TMPDIR}/install.${TMPPID} +INSTALLTMP!=3D /usr/bin/mktemp -d -t install =20 # # 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 \ @@ -781,5 +778,8 @@ .endfor par-${__target}: ${SUBDIR:S/$/.${__target}__D/} .endfor + +.END: + rm -rf ${INSTALLTMP} =20 .include <bsd.subdir.mk> --1ccMZA6j1vT5UqiK Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE6X8QdWry0BWjoQKURAttsAKCBwTpTsMY0y+NU6I2tywzr1kKu1wCfY1LU ba9BaAQi2he2O8m/ueqan+U= =83JP -----END PGP SIGNATURE----- --1ccMZA6j1vT5UqiK-- 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?20010112185733.C25168>