all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* rename-file etc. with directory destination
@ 2017-08-13 22:51 Paul Eggert
  0 siblings, 0 replies; only message in thread
From: Paul Eggert @ 2017-08-13 22:51 UTC (permalink / raw)
  To: Emacs Development

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.



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-08-13 22:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-13 22:51 rename-file etc. with directory destination Paul Eggert

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.