The --preserve-root failsafe does not exit when it should. It prints a
warning and continues to recurse. ROOT_DEV_INO_WARN should pass a non-zero
value as the first argument to error() to exit.
--- lib/root-dev-ino.h.orig 2006-12-12 10:47:22.000000000 -0500
+++ lib/root-dev-ino.h 2006-12-12 10:51:56.000000000 -0500
@@ -36,14 +36,14 @@
# define ROOT_DEV_INO_WARN(Dirname) \
do \
{ \
+ error (0, 0, _("use --no-preserve-root to override this failsafe")); \
if (STREQ (Dirname, "/")) \
- error (0, 0, _("it is dangerous to operate recursively on %s"), \
+ error (EXIT_FAILURE, 0, _("it is dangerous to operate recursively on
%s"), \
quote (Dirname)); \
else \
- error (0, 0, \
+ error (EXIT_FAILURE, 0, \
_("it is dangerous to operate recursively on %s (same as %s)"), \
quote_n (0, Dirname), quote_n (1, "/")); \
- error (0, 0, _("use --no-preserve-root to override this failsafe")); \
} \
while (0)
_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils