From owner-freebsd-audit Fri Jan 12 18:56:40 2001 Delivered-To: freebsd-audit@freebsd.org Received: from citusc.usc.edu (citusc.usc.edu [128.125.38.123]) by hub.freebsd.org (Postfix) with ESMTP id 3A0C937B699 for ; Fri, 12 Jan 2001 18:56:22 -0800 (PST) Received: (from kris@localhost) by citusc.usc.edu (8.9.3/8.9.3) id SAA25361; Fri, 12 Jan 2001 18:57:33 -0800 Date: Fri, 12 Jan 2001 18:57:33 -0800 From: Kris Kennaway To: Chris Faulhaber Cc: freebsd-audit@FreeBSD.ORG Subject: Re: temp dirs in Makefile.inc1 Message-ID: <20010112185733.C25168@citusc.usc.edu> References: <20010111101813.A76735@peitho.fxp.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="1ccMZA6j1vT5UqiK" Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <20010111101813.A76735@peitho.fxp.org>; from jedgar@fxp.org on Thu, Jan 11, 2001 at 10:18:13AM -0500 Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG --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 --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