all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
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	[thread overview]
Message-ID: <878rivu9bo.fsf@localhost> (raw)
In-Reply-To: <jwvwn6kpmir.fsf-monnier+emacs@gnu.org>

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	other threads:[~2022-12-25  9:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <167164907706.9937.9724677162932540750@vcs2.savannah.gnu.org>
     [not found] ` <20221221185757.74391C00613@vcs2.savannah.gnu.org>
2022-12-21 19:07   ` [elpa] externals-release/org e2366ac283: * lisp/org-persist.el: Do not litter /tmp when native compiling Stefan Monnier
2022-12-21 19:15     ` Ihor Radchenko
2022-12-21 19:54       ` Stefan Monnier
2022-12-25  9:22         ` Ihor Radchenko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878rivu9bo.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.