RE: tmp issues: trap before making safe tmp and no change directory

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

 



On Tue, 28 Oct 2003, Daniel Linder wrote:

>   Rather than using another value for the "needsCleanup" variable, why
> not use the test of the existance of "$tmpdir" as the value for your
> "needsCleanup" value?  I.e. replace "$needsCleanup" with a subroutine
> that returns "true" if the "$tmpdir" exists?  Is there a bad race
> condition here?

(Just to note, this is not my code.)

Even if the $tmpdir exists, it may not be the one created by the script.

I guess it could check to see if it is not a symlink. (But I think the
trap should just be done after it is safely created.)

And the "rm -f $tmpdir/*" cleanup potentially can happen before the script
safely attempts to create its own tmpdir.

   Jeremy C. Reed
   http://bsd.reedmedia.net/

------------------------------------------------------------------------
     To unsubscribe email security-discuss-request@xxxxxxxxxxxxxxxxx
         with "unsubscribe" in the subject of the message.


[Index of Archives]     [Fedora Announce]     [Linux Crypto]     [Kernel]     [Netfilter]     [Bugtraq]     [USB]     [Fedora Security]

  Powered by Linux