emacs-devel
[Top][All Lists]
Advanced

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

Re: Remote temporary directory


From: Stefan Monnier
Subject: Re: Remote temporary directory
Date: Fri, 29 Jul 2016 17:02:19 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

>> `make-remote-temp-file' comes to mind, but this would imply that the
>> result resides on a remote host. It should still behave like
>> `make-temp-file' when `default-directory' is local, and even in case it
>> calls a file name handler, that handler must not support remote files.
>> Maybe you have a better name.
> I'm  a little bit undecided. Shall I try it this way? A better name?

Maybe a new `make-nearby-temp-file` would work, where Emacs would try to
create the temp file "as close as possible" to some target directory.

This could also be used for things like "save into a temp file and then
rename that file to the actual destination".

This said, there are some non-trivial security issues at stake here:
make-temp-file should usually only be used in directories which are
either only writable by "trusted" users (i.e. only by the current user),
or which have the magical "sticky" bit set.  So using just any writable
"nearby" directory is generally unsafe.


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]