coreutils/tests
Paul Eggert cdec7e6e93 Correct cp's handling of destination symlinks in some cases.
* NEWS: "cp" no longer considers a destination symlink to be the
same as the referenced file when copying links or making backups.
* src/copy.c (copy_reg): When following a symlink, use the
followed name in later chown etc. requests, so that the created
file is affected, rather than the symlink.  Use O_NOFOLLOW on
source when not dereferencing symlinks; this avoids a race.
Preserve errno correctly when doing multiple open attempts on the
destination.
(copy_internal): Follow destination symlinks only when copying a
regular file and only when we don't intend to remove or rename the
destination first, regardless of whether following source
symlinks; this is because since POSIX and tradition (e.g.,
FreeBSD) say we should ordinarily follow destination symlinks if
the system calls would ordinarily do so.
* src/copy.h (struct cp_options): Add comment that 'dereference'
is only for source files.
* src/cp.c (usage): Note that --derereference etc. are only for
source files.
(make_dir_parents_private): Follow symlinks, regardless of whether
--dereference is specified, because these are destination symlinks.
* tests/cp/same-file: Adjust tests to match revised behavior.
Filter out perror output since it might vary from host to host.
Use sed alone instead of also using echo.

* doc/coreutils.texi (cp invocation): Document the behavior better when
the destination is a symlink.  Clarify source versus destination
symlinks.  Describe the new behavior for destination symlinks.

2007-06-15  Jim Meyering  <jim@meyering.net>

* src/copy.c: Include "canonicalize.h".
(copy_reg): Use canonicalize_filename_mode to follow the symlink,
so that we can always open with O_EXCL and avoid a race.
2007-06-15 22:47:16 +02:00
..
chgrp * tests/chgrp/basic: Also avoid test failures on Darwin 8.8.x (MacOS X 10.4). 2007-03-09 20:09:46 +01:00
chmod ls: Add support for SELinux and a slightly modified -Z option. 2007-03-29 21:37:05 +02:00
chown Remove the "gnits" option; it prohibits my using "+" as a version 2007-02-24 13:57:51 +01:00
cp Correct cp's handling of destination symlinks in some cases. 2007-06-15 22:47:16 +02:00
cut "cut -f 2-0" now fails; before, it was equivalent to "cut -f 2-" 2007-05-22 13:56:34 +02:00
dd Honor dd's noatime flag if possible, even if not supported on build fs 2007-02-22 19:09:35 +01:00
dircolors Put CU_TEST_NAME in the environment for each test run by "make check". 2007-01-13 11:32:19 +01:00
du Fix a test script not to claim an ext2 file system is of type xfs. 2007-03-21 17:19:30 +01:00
expr Remove the "gnits" option; it prohibits my using "+" as a version 2007-02-24 13:57:51 +01:00
factor Remove the "gnits" option; it prohibits my using "+" as a version 2007-02-24 13:57:51 +01:00
fmt Put CU_TEST_NAME in the environment for each test run by "make check". 2007-01-13 11:32:19 +01:00
general Remove the "gnits" option; it prohibits my using "+" as a version 2007-02-24 13:57:51 +01:00
head Remove the generated tests/*/Makefile.am files from version control. 2007-05-13 18:23:41 +02:00
install ls: Add support for SELinux and a slightly modified -Z option. 2007-03-29 21:37:05 +02:00
join Remove the generated tests/*/Makefile.am files from version control. 2007-05-13 18:23:41 +02:00
ln Remove the "gnits" option; it prohibits my using "+" as a version 2007-02-24 13:57:51 +01:00
ls Avoid test failure when run with an unusual umask. 2007-05-04 13:32:46 +02:00
ls-2 * THANKS: Add Andreas Frische. 2007-04-24 09:20:52 +02:00
md5sum Put CU_TEST_NAME in the environment for each test run by "make check". 2007-01-13 11:32:19 +01:00
misc cut: diagnose a range starting with 0 (-f 0-2) as invalid, and 2007-05-22 18:47:17 +02:00
mkdir ls: Add support for SELinux and a slightly modified -Z option. 2007-03-29 21:37:05 +02:00
mv ls: Add support for SELinux and a slightly modified -Z option. 2007-03-29 21:37:05 +02:00
od Put CU_TEST_NAME in the environment for each test run by "make check". 2007-01-13 11:32:19 +01:00
pr Remove the generated tests/*/Makefile.am files from version control. 2007-05-13 18:23:41 +02:00
readlink Remove the "gnits" option; it prohibits my using "+" as a version 2007-02-24 13:57:51 +01:00
rm Avoid failure of root-only test when run with a restrictive umask. 2007-05-04 12:01:43 +02:00
rmdir Remove the "gnits" option; it prohibits my using "+" as a version 2007-02-24 13:57:51 +01:00
seq Remove the "gnits" option; it prohibits my using "+" as a version 2007-02-24 13:57:51 +01:00
sha1sum Put CU_TEST_NAME in the environment for each test run by "make check". 2007-01-13 11:32:19 +01:00
shred Put CU_TEST_NAME in the environment for each test run by "make check". 2007-01-13 11:32:19 +01:00
sort Remove the generated tests/*/Makefile.am files from version control. 2007-05-13 18:23:41 +02:00
sort-time Add/fix copyright notices and adjust to latest GNU FDL. 2006-08-17 19:58:17 +00:00
stty stty: diagnose an invalid hex value in 35-colon commmand-line argument 2007-05-22 07:55:40 +02:00
sum Put CU_TEST_NAME in the environment for each test run by "make check". 2007-01-13 11:32:19 +01:00
tac Remove the generated tests/*/Makefile.am files from version control. 2007-05-13 18:23:41 +02:00
tail Remove the generated tests/*/Makefile.am files from version control. 2007-05-13 18:23:41 +02:00
tail-2 Put CU_TEST_NAME in the environment for each test run by "make check". 2007-01-13 11:32:19 +01:00
tee Remove the "gnits" option; it prohibits my using "+" as a version 2007-02-24 13:57:51 +01:00
test Remove the generated tests/*/Makefile.am files from version control. 2007-05-13 18:23:41 +02:00
touch Remove the "gnits" option; it prohibits my using "+" as a version 2007-02-24 13:57:51 +01:00
tr Remove the generated tests/*/Makefile.am files from version control. 2007-05-13 18:23:41 +02:00
tsort Put CU_TEST_NAME in the environment for each test run by "make check". 2007-01-13 11:32:19 +01:00
unexpand Put CU_TEST_NAME in the environment for each test run by "make check". 2007-01-13 11:32:19 +01:00
uniq Remove the generated tests/*/Makefile.am files from version control. 2007-05-13 18:23:41 +02:00
wc Remove the generated tests/*/Makefile.am files from version control. 2007-05-13 18:23:41 +02:00
.cvsignore * aclocal.m4, config.hin, configure: 2006-08-22 18:50:24 +00:00
acl Add/fix copyright notices and adjust to latest GNU FDL. 2006-08-17 19:58:17 +00:00
Coreutils.pm Add/fix copyright notices and adjust to latest GNU FDL. 2006-08-17 19:58:17 +00:00
envvar-check * tests/envvar-check: Add more variable names to the list of those 2006-09-17 20:29:05 +00:00
expensive Add/fix copyright notices and adjust to latest GNU FDL. 2006-08-17 19:58:17 +00:00
group-names Add/fix copyright notices and adjust to latest GNU FDL. 2006-08-17 19:58:17 +00:00
help-version * src/runcon.c: New program. 2007-03-29 21:37:06 +02:00
input-tty Replace all occurrences of `(exit N); exit' with 2004-06-23 15:07:00 +00:00
lang-default * tests/lang-default (LC_ALL): Set to "C", so we get 2006-08-16 20:11:42 +00:00
Makefile.am Arrange for "make check-root" to run the new root-only test. 2007-03-29 21:37:06 +02:00
Makefile.am.in Put CU_TEST_NAME in the environment for each test run by "make check". 2007-01-13 11:32:19 +01:00
mk-script Add/fix copyright notices and adjust to latest GNU FDL. 2006-08-17 19:58:17 +00:00
other-fs-tmpdir new feature: rm accepts new option: --one-file-system 2006-10-25 00:01:33 +02:00
priv-check Add/fix copyright notices and adjust to latest GNU FDL. 2006-08-17 19:58:17 +00:00
README s/any/some/ 2002-07-01 21:15:13 +00:00
rwx-to-mode Add/fix copyright notices and adjust to latest GNU FDL. 2006-08-17 19:58:17 +00:00
sample-test * tests/sample-test: Update copyright date to 2007. 2007-01-07 18:38:56 +01:00
selinux * tests/cp/cp-a-selinux: New file. Test for the bug reported in 2007-03-29 21:37:06 +02:00
setgid-check Add/fix copyright notices and adjust to latest GNU FDL. 2006-08-17 19:58:17 +00:00
sparse-file * NEWS: Fix cp --sparse so that it preserves tail-end sparseness, even 2006-08-19 14:01:29 +00:00
umask-check Initial revision. 2005-06-22 18:07:36 +00:00
very-expensive just like expensive, but `very' 2005-11-04 09:52:09 +00:00

A note about Makefile.am.in.
It is used (usually only by the maintainer) to generate some of the
Makefile.am files in these subdirectories.