Nikolai Weibull wrote:

> On Fri, Feb 20, 2009 at 10:16, Tony Mechelynck
> <[email protected]> wrote:
> 
> On 20/02/09 05:45, Bram Moolenaar wrote:
> 
> >> Changing this behavior will not be easy, so you will have to come up
> >> with some kind of proof that the current mechanism may fail.
> 
> > Also, what about the case when a script might use tempname() in order to
> > get a unique name for a directory? If you (Matt) leave the file lying
> > around, directory creation will IIUC be impossible, which breaks
> > compatibility with existing behaviour.
> 
> We recently discussed the security issues of temporary files on this
> list.  Having functions that only return the name of a temporary files
> is insufficient.  You need functions that return the actual file
> handle to be secure (along with a bunch of other constraints).  I
> realize that this isn't something that can be fixed in a simple manner
> in VimL.

It's secure if the directory where the file (or directory) is located is
only writable by the user.  What you talk about is when using a temp
directory that is shared between users.  In that case someone else may
be able to rename the file you created and put another one in its place.

-- 
hundred-and-one symptoms of being an internet addict:
95. Only communication in your household is through email.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui