1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-04 22:50:59 -08:00
emacs/test/lisp/net
Paul Eggert 01c885f21f Fix race with rename-file etc. with dir NEWNAME
This changes the behavior of rename-file etc. slightly.
The old behavior mostly disagreed with the documentation, and had
a race condition bug that could allow attackers to modify victims'
write-protected directories (Bug#27986).
* doc/lispref/files.texi (Changing Files): Document that in
rename-file etc., NEWFILE is special if it is a directory name.
* etc/NEWS: Document the change in behavior.
* src/fileio.c (directory_like): Remove.  All uses removed.
(expand_cp_target): Test only whether NEWNAME is a directory name,
not whether it is currently a directory.  This avoids a race.
(Fcopy_file, Frename_file, Fadd_name_to_file, Fmake_symbolic_link):
Document behavior if NEWNAME is a directory name.
(Frename_file): Simplify now that the destdir behavior occurs
only when NEWNAME is a directory name.
* test/lisp/net/tramp-tests.el (tramp-test11-copy-file)
(tramp-test12-rename-file, tramp--test-check-files):
Adjust tests to match new behavior.
2017-09-10 15:46:51 -07:00
..
dbus-tests.el test/*.el: Avoid byte-compiler warnings 2017-01-28 04:40:36 +01:00
gnutls-tests.el Fix the MS-Windows build due to added GnuTLS functions 2017-07-14 22:00:55 +03:00
mailcap-tests.el Add tests for mailcap.el 2017-09-05 11:55:01 -04:00
network-stream-tests.el Further attempt to avoid hang in network-stream-tests 2017-07-21 14:01:12 -04:00
newsticker-tests.el
puny-tests.el Give test files a -tests.el suffix 2017-06-09 15:56:49 +02:00
sasl-scram-rfc-tests.el
shr-tests.el
tramp-tests.el Fix race with rename-file etc. with dir NEWNAME 2017-09-10 15:46:51 -07:00