From owner-freebsd-audit Fri Jan 19 20:27:42 2001 Delivered-To: freebsd-audit@freebsd.org Received: from peitho.fxp.org (peitho.fxp.org [209.26.95.40]) by hub.freebsd.org (Postfix) with ESMTP id E3E1137B400; Fri, 19 Jan 2001 20:27:24 -0800 (PST) Received: from earth.causticlabs.com (oca-pm3-6-88.hitter.net [207.192.77.88]) by peitho.fxp.org (Postfix) with ESMTP id 1F3AF1360C; Fri, 19 Jan 2001 23:27:21 -0500 (EST) Received: by earth.causticlabs.com (Postfix, from userid 1000) id 59CA81F82; Fri, 19 Jan 2001 23:27:18 -0500 (EST) Date: Fri, 19 Jan 2001 23:27:18 -0500 From: Chris Faulhaber To: Kris Kennaway Cc: freebsd-audit@FreeBSD.ORG Subject: Re: mktemp(1) usage Message-ID: <20010119232718.A54822@earth.causticlabs.com> Mail-Followup-To: Chris Faulhaber , Kris Kennaway , freebsd-audit@FreeBSD.ORG References: <20001209171334.J671@puck.firepipe.net> <20001209150853.A57045@peitho.fxp.org> <20001209171334.J671@puck.firepipe.net> <200012100529.WAA26442@harmony.village.org> <20001212180805.B10901@citusc.usc.edu> <20001212181322.C10901@citusc.usc.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20001212181322.C10901@citusc.usc.edu>; from kris@FreeBSD.ORG on Tue, Dec 12, 2000 at 06:13:22PM -0800 Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, Dec 12, 2000 at 06:13:22PM -0800, Kris Kennaway wrote: > On Tue, Dec 12, 2000 at 06:08:05PM -0800, Kris Kennaway wrote: > > On Sat, Dec 09, 2000 at 10:29:50PM -0700, Warner Losh wrote: > > > In message <20001209171334.J671@puck.firepipe.net> Will Andrews writes: > > > : On Sat, Dec 09, 2000 at 03:08:54PM -0500, Chris Faulhaber wrote: > > > : > Would it be more appropriate for scripts such as periodic(8) to > > > : > call mktemp(1) using the -t flag. In addition to using TMPDIR, > > > : > this allows the use of the system's _PATH_TMP instead of > > > : > hardcoding /tmp. > > > : > > > : Maybe that method doesn't use a random enough number to avoid file > > > : races? > > > > > > If it doesn't, then maybe it should, don't you think. But I think it > > > does. We're looking at 8 X's. It would also be a good place to bump > > > it to 10 if we needed to, say. > > > > No need - with the old method of mktemp() encoding you needed more > > than 6 X's to be secure, but with the new dense encoding even 6 is > > fine. Moreover, mktemp(1) is actually mkstemp(1), so there was never > > any problem with it unless you use -u. > > Forgot to mention that the new mktemp() hasn't yet been MFC'ed - it's > in my merge folder but I didn't get time to do it before I left the > US. That should be done before merging any patches which reduce the > number of X's in use. > Any chance this can be MFC'd? -- Chris D. Faulhaber - jedgar@fxp.org - jedgar@FreeBSD.org -------------------------------------------------------- FreeBSD: The Power To Serve - http://www.FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message