From owner-freebsd-audit Sat Dec 9 12: 8:55 2000 From owner-freebsd-audit@FreeBSD.ORG Sat Dec 9 12:08:53 2000 Return-Path: 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 8489D37B400 for ; Sat, 9 Dec 2000 12:08:53 -0800 (PST) Received: by peitho.fxp.org (Postfix, from userid 1000) id 3CDE713612; Sat, 9 Dec 2000 15:08:54 -0500 (EST) Date: Sat, 9 Dec 2000 15:08:54 -0500 From: Chris Faulhaber To: freebsd-audit@FreeBSD.org Subject: mktemp(1) usage Message-ID: <20001209150853.A57045@peitho.fxp.org> Mail-Followup-To: Chris Faulhaber , freebsd-audit@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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. -- Chris D. Faulhaber - jedgar@fxp.org - jedgar@FreeBSD.org -------------------------------------------------------- FreeBSD: The Power To Serve - http://www.FreeBSD.org Index: periodic.sh =================================================================== RCS file: /home/ncvs/src/usr.sbin/periodic/periodic.sh,v retrieving revision 1.19 diff -u -r1.19 periodic.sh --- periodic.sh 2000/11/26 03:37:34 1.19 +++ periodic.sh 2000/12/03 17:50:51 @@ -27,7 +27,7 @@ host=`hostname` export host -tmp_output=`mktemp ${TMPDIR:-/tmp}/periodic.XXXXXXXXXX` +tmp_output=`mktemp -t periodic` # Execute each executable file in the directory list. If the x bit is not # set, assume the user didn't really want us to muck with it (it's a To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message