Bugtraq mailing list archives

Re: Is /tmp still appropriate? (was Re: [hacksware]Pine temporary file hijacking vulnerability)


From: Ryan Russell <ryan () SECURITYFOCUS COM>
Date: Mon, 18 Dec 2000 13:47:37 -0800

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


Current thread: