From c8ef95eaed944ec70ccd70c077cf465c6311c1b6 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Wed, 20 Dec 2006 19:56:20 +0100 Subject: "rm -rf /etc/motd" (run by non-root) now prints a diagnostic. * src/remove.c (remove_entry): Handle EACCES for a non-directory, too. Karl Berry reported that a cross-partition "mv /etc/issue ~" failed with the um,... suboptimal diagnostic, "mv: cannot remove `/etc/issue': Not a directory". * tests/rm/Makefile.am (TESTS): Add fail-eacces. * tests/rm/fail-eacces: New file. * NEWS: Mention that both mv and rm are affected. --- ChangeLog | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index ded57704e..67aff09ac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,17 @@ 2006-12-20 Jim Meyering + "rm -rf /etc/motd" (run by non-root) now prints a diagnostic. + * src/remove.c (remove_entry): Handle EACCES for a non-directory, too. + Don't let a non-directory get by with errno == EPERM, either. + Check the file type directly (using cached stat value), rather + than trying to guess it from errno values. + Karl Berry reported that a cross-partition "mv /etc/issue ~" + failed with the um,... suboptimal diagnostic, + "mv: cannot remove `/etc/issue': Not a directory". + * tests/rm/Makefile.am (TESTS): Add fail-eacces. + * tests/rm/fail-eacces: New file. + * NEWS: Mention that both mv and rm are affected. + "cut -f 2- A B" no longer triggers a double-free bug * src/cut.c (cut_fields): Set file-scoped global to NULL after freeing it. This avoids a double-free (and core dump on some systems) -- cgit v1.2.3-70-g09d2