[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [gmail] Re: sponsor quake3 quake3-data packages



On Thu, Nov 10, 2005 at 08:02:51PM +0100, Marc Leeman wrote:
> > That is a tag + security race condition between rm and mkdir.  You'll
> > want to use mktemp -d instead.
> fixed, tnx.
> 
> > I didn't look at your script closely; there may be other problems.
> > Nothing should ever get written to /tmp/ except if the output filename
> > is the result of a successful ($?==0) call to mktemp or tempfile.
> 
> But I can use /tmp/ to store the result of an archive (in a mktemp dir)
> if I remove it afterwards?
Right; You can also do whatever you want to a file whose name is
outputted by a successful invocation of mktemp, but note that this
probably wont play nice with wget.  If fn=`mktemp`, and you wget -O
$fn, then wget will probably call its outupt $fn.1, since $fn exists
(as a requirement for this to be done safely way, it must be created
before the name is outputted).

-- 
Clear skies,
Justin



Reply to: