From 2bdc48121916ab0d7bb7d0cb5cee25549c3705c9 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Fri, 16 Nov 2007 09:31:15 +0100 Subject: cp: by default, refuse to copy through a dangling destination symlink * NEWS: Mention this change. * doc/coreutils.texi (cp invocation): Describe the new behavior. * src/copy.c: No longer include "canonicalize.h". (copy_reg): Upon failure to open a dangling destination symlink, don't canonicalize the name, but rather fail (default) or, with POSIXLY_CORRECT, repeat the open call without O_EXCL (potentially dangerous). * src/copy.h (struct cp_options) [open_dangling_dest_symlink]: New member. Reorder the others, grouping "bool" and "enum" members together. * tests/cp/thru-dangling: Test for changed and new behavior. * src/cp.c (cp_option_init): Initialize new member. * src/install.c (cp_option_init): Likewise. * src/mv.c (cp_option_init): Likewise. Signed-off-by: Jim Meyering --- NEWS | 3 +++ 1 file changed, 3 insertions(+) (limited to 'NEWS') diff --git a/NEWS b/NEWS index 11efa7582..a5936f896 100644 --- a/NEWS +++ b/NEWS @@ -15,6 +15,9 @@ GNU coreutils NEWS -*- outline -*- ** Changes in behavior + cp, by default, refuses to copy through a dangling destination symlink + Set POSIXLY_CORRECT if you require the old, risk-prone behavior. + pr -F no longer suppresses the footer or the first two blank lines in the header. This is for compatibility with BSD and POSIX. -- cgit v1.2.3-70-g09d2