From owner-freebsd-audit Tue Oct 24 5: 5:14 2000 Delivered-To: freebsd-audit@freebsd.org Received: from lucifer.ninth-circle.org (lucifer.bart.nl [194.158.168.74]) by hub.freebsd.org (Postfix) with ESMTP id 1178A37B479 for ; Tue, 24 Oct 2000 05:05:12 -0700 (PDT) Received: (from asmodai@localhost) by lucifer.ninth-circle.org (8.11.0/8.11.0) id e9OC5A595360 for audit@freebsd.org; Tue, 24 Oct 2000 14:05:10 +0200 (CEST) (envelope-from asmodai) Date: Tue, 24 Oct 2000 14:05:10 +0200 From: Jeroen Ruigrok van der Werven To: audit@freebsd.org Subject: printjob.c mktemp() problem Message-ID: <20001024140510.G93799@lucifer.bart.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Organisation: VIA Net.Works The Netherlands Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In printjob.c in the dir src/usr.sbin/lpr/lpd we see a mktemp() call which creates a file accroding to the template. I also see that it is getting unlink()'d again a bunch of lines later. I later on see some open() call on the same tempfile array which does exactly what the mktemp(3) manpage warns about. Am I right into thinking this might be a good candidate for a mktemp()->mkstemp() conversion? -- Jeroen Ruigrok van der Werven Network- and systemadministrator VIA Net.Works The Netherlands BSD: Technical excellence at its best http://www.via-net-works.nl Asleep is the Rose, in tired innocence dreaming Time away... To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message