From owner-freebsd-hackers Tue May 16 10:45:22 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from obie.softweyr.com (obie.softweyr.com [204.68.178.33]) by hub.freebsd.org (Postfix) with ESMTP id 870E937BB09; Tue, 16 May 2000 10:45:14 -0700 (PDT) (envelope-from wes@softweyr.com) Received: from softweyr.com (ip43.salt-lake-city6.ut.pub-ip.psi.net [38.27.95.43]) by obie.softweyr.com (8.8.8/8.8.8) with ESMTP id LAA10770; Tue, 16 May 2000 11:44:42 -0600 (MDT) (envelope-from wes@softweyr.com) Message-ID: <39218971.AE6779B5@softweyr.com> Date: Tue, 16 May 2000 11:46:25 -0600 From: Wes Peters Organization: Softweyr LLC X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 4.0-STABLE i386) X-Accept-Language: en MIME-Version: 1.0 To: Alfred Perlstein Cc: Kris Kennaway , Tim Vanderhoek , James Howard , freebsd-hackers@FreeBSD.ORG Subject: Re: mktemp() vs. mkstemp() References: <39204472.706CB1D2@softweyr.com> <20000515123256.C249@fw.wintelcom.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Alfred Perlstein wrote: > > * Wes Peters [000515 12:11] wrote: > > Kris Kennaway wrote: > > > > > > On Sun, 14 May 2000, Tim Vanderhoek wrote: > > > > > > > It's certainly not like it would be the first non-portable function > > > > we've added. Where adding functions to libraries encourages better > > > > coding practices, I'm (often) in favour of it, especially if it > > > > encourages more secure coding practices. Ultimately everyone > > > > benefits, and the pain is short-term. > > > > > > True, but I'd venture that in most of those cases they did something a > > > little less trivial than one line of code. > > > > We could simply redefine mktemp to not be such a security hole. Do > > common programs that use mktemp depend on side effects? > > The side effect they depend on is that the char * returned is unique, > but since no file was created it's not garanteed so. You can't fix > it. Drat, that's right. Anyone wanna pollute the kernel and filesystem layers with a "reserve this filename" function? That sounds fugly, doesn't it? -- "Where am I, and what am I doing in this handbasket?" Wes Peters Softweyr LLC wes@softweyr.com http://softweyr.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message