From owner-freebsd-audit Tue Nov 7 12:18: 8 2000 Delivered-To: freebsd-audit@freebsd.org Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by hub.freebsd.org (Postfix) with ESMTP id E29FC37B479 for ; Tue, 7 Nov 2000 12:18:04 -0800 (PST) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.9.3/8.9.3) id PAA86497; Tue, 7 Nov 2000 15:18:00 -0500 (EST) (envelope-from wollman) Date: Tue, 7 Nov 2000 15:18:00 -0500 (EST) From: Garrett Wollman Message-Id: <200011072018.PAA86497@khavrinen.lcs.mit.edu> To: Garance A Drosihn Cc: audit@FreeBSD.org, freebsd-print@bostonradio.org Subject: Fixing mktemp() call in lpd/printjob.c (logging) In-Reply-To: References: <20001024140510.G93799@lucifer.bart.nl> <20001024222716.B2020@lucifer.bart.nl> Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 < said: > Okay, I believe I have an update which replaces the call to > mktemp with a call to mkstemp, without introducing any problems > to printjob. This seems to be one of those cases where the ``might be unsafe'' warning does us a disservice. Since this file is created in the spool directory, which is only writable by the spooler subsystem, mktemp() is safe here. That said, mkstemp() is a clearly superior interface. I would, however, prefer to see consistent style for variable names. - -GAWollman - -- Garrett A. Wollman | O Siem / We are all family / O Siem / We're all the same wollman@lcs.mit.edu | O Siem / The fires of freedom Opinions not those of| Dance in the burning flame MIT, LCS, CRS, or NSA| - Susan Aglukark and Chad Irschick -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (FreeBSD) Comment: For info see http://www.gnupg.org iD8DBQE6CGNqI+eG6b7tlG4RAlakAKCMoUU175iMyOhrgdp6NeTMgAH9fwCcCLSB 9M2bHnGmuOAHsJXnQCH4kUQ= =UG4d -----END PGP SIGNATURE----- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message