[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: psvn.el: insecure temporary files

From: Kalle Olavi Niemitalo <kon_at_iki.fi>
Date: 2003-08-09 18:12:03 CEST

Robert Spier <rspier@pobox.com> writes:

> (make-temp-name (temp-directory))

That does not actually create the file, so it is possible for
another process to create a symlink there after make-temp-name
has chosen the name. The mustbenew parameter of write-region
would allow detecting that.

> (mm-make-temp-file (temp-directory))
> this actually looks like it comes from gnus.. so maybe borrow the
> code?

The version in CVS Gnus either redirects to make-temp-file (which
is present in Emacs 21.2 but not in XEmacs 21.4) or is as unsafe
as make-temp-name.

>> However, this has two flaws: any files left over in that
>> directory are not automatically removed by the system
>
> After generating the file, they should be added to some list to delete
> later via a hook.

I meant a failsafe if Emacs or the whole computer crashes.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Aug 9 18:13:09 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.