emacs-devel
[Top][All Lists]
Advanced

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

Re: [elpa] externals-release/org e2366ac283: * lisp/org-persist.el: Do n


From: Ihor Radchenko
Subject: Re: [elpa] externals-release/org e2366ac283: * lisp/org-persist.el: Do not litter /tmp when native compiling
Date: Sun, 25 Dec 2022 09:22:19 +0000

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> It would be wonderful, but
>>
>>     There is a race condition between calling make-temp-name and
>>     later creating the file, which opens all kinds of security holes.
>>     For that reason, you should normally use make-temp-file instead.
>>
>> which scared me.
>
> By keeping `org-persist-directory` but deleting the dir, you basically
> turn the narrow window of the race condition into an arbitrarily
> long window, so your code is worse than using `make-temp-name` :-(

Fair point.

I now fixed this by creating the directory at the beginning and only
removing it before exiting Emacs.

https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?h=bugfix&id=987fe173acf6c6fdb4bec5c5c07796d98c6e1983

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

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