OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Subject: Re: Is /tmp still appropriate? (was Re: [hacksware]Pine temporary file hijacking vulnerability)
From: Ryan Russell (ryanSECURITYFOCUS.COM)
Date: Mon Dec 18 2000 - 15:47:37 CST


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