From: Paul Eggert <eggert@cs.ucla.edu>
To: Emacs Development <Emacs-devel@gnu.org>
Subject: rename-file etc. with directory destination
Date: Sun, 13 Aug 2017 15:51:31 -0700 [thread overview]
Message-ID: <7d06a547-5bb0-3450-79c0-8c7b6d0df77a@cs.ucla.edu> (raw)
To fix a security problem reported in Bug#27986 I am proposing an incompatible
change to the Lisp functions rename-file etc. when the NEWFILE argument is a
directory but not a directory name (in the Emacs sense). For details, please see:
https://bugs.gnu.org/27986#14
and please follow up there. Here's a copy of the proposed NEWS entry:
** When the NEWNAME argument of 'copy-file', 'rename-file',
'add-name-to-file', or 'make-symbolic-link' is an existing directory
and the intent is to act on an entry in that directory, NEWNAME should
now be a directory name, e.g., (rename-file "e" "f/") renames to 'f/e'.
Although this formerly happened sometimes even when NEWNAME was not a
directory name, as in (rename-file "e" "f") where 'f' happened to be a
directory, the old behavior had inherent races that led to security
holes, and disagreed with longstanding documentation. A call like
(rename-file A B) that used the old, undocumented behavior can be
written as (rename-file A (file-name-as-directory B)), a formulation
portable to both older and newer versions of Emacs.
reply other threads:[~2017-08-13 22:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=7d06a547-5bb0-3450-79c0-8c7b6d0df77a@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=27986@debbugs.gnu.org \
--cc=Emacs-devel@gnu.org \
/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.