[18164] in bugtraq
Re: Is /tmp still appropriate? (was Re: [hacksware]Pine temporary
daemon@ATHENA.MIT.EDU (Ryan Russell)
Tue Dec 19 01:00:19 2000
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Message-Id: <Pine.GSO.4.30.0012181344550.7266-100000@mail>
Date: Mon, 18 Dec 2000 13:47:37 -0800
Reply-To: Ryan Russell <ryan@SECURITYFOCUS.COM>
From: Ryan Russell <ryan@SECURITYFOCUS.COM>
X-To: Michael Damm <miked@ACCESSNW.NET>
To: BUGTRAQ@SECURITYFOCUS.COM
In-Reply-To: <Pine.LNX.4.05.10012151231430.690-100000@mail.accessnw.net>
On Fri, 15 Dec 2000, Michael Damm wrote:
> I alwas was a difficult child.
> TMPKEY="$RANDOM"
> echo "foo" >/tmp/blah.$TMPKEY
Which allows for the possibility of collisions. Various instances of
the script might on rare occasion step on each-others temp files, causing
problems at, uh... random. That's why $$ is used, because the OS is
responsible for making sure process IDs are unique for all the current
processes.
Ryan