From owner-freebsd-current Thu Jun 8 22: 7:19 2000 Delivered-To: freebsd-current@freebsd.org Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by hub.freebsd.org (Postfix) with ESMTP id D4CDD37B5EA; Thu, 8 Jun 2000 22:07:14 -0700 (PDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.9.3/8.9.3) id AAA18276; Fri, 9 Jun 2000 00:07:07 -0500 (CDT) (envelope-from dan) Date: Fri, 9 Jun 2000 00:07:07 -0500 From: Dan Nelson To: Kris Kennaway Cc: Boris Popov , John LoVerso , current@FreeBSD.ORG Subject: Re: mktemp() patch Message-ID: <20000609000707.A16619@dan.emsphone.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: ; from "Kris Kennaway" on Thu Jun 8 20:47:36 GMT 2000 X-OS: FreeBSD 5.0-CURRENT Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In the last episode (Jun 08), Kris Kennaway said: > On Fri, 9 Jun 2000, Boris Popov wrote: > > Count both, nwfs and smbfs, because any program can attempt to > > create temporary file on these filesystems. File with an invalid > > file name will be rejected, and this will cost an additional lookup > > operation(s). > > I'm not sure that weird filesystems are a valid argument against > mktemp() naming - there are LOTS of UNIX code which assumes UNIX > namespace conventions, and it's not just mktemp() which is going to > break on weird filesystems. For example, should we limit all FreeBSD > file names to 8.3 single-case in case someone wants to run from an > old-style MSDOS partition? I still suggest not using symbols at all, since I'd like to be able to quickly remove tempfiles by hand without worrying if I have to escape # or ^, etc. Considering the great jump in randomness between the orginal and the proposed (65536 -> 916132832 just using [A-Za-z0-9] ), I'd rather stick with easy-to-read and type tempnames. > Basically, I think the answer is not to use a nwfs or smbfs > filesystem as your TMPDIR :-) mktemp() doesn't use TMPDIR; the user gets to pass a template of his choosing, which could reasonably be just "bobXXXXX.tmp". -- Dan Nelson dnelson@emsphone.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message