--preserve-root warns but does not exit when running on / with recursion
From:
Matthew M. Boedicker
Subject:
--preserve-root warns but does not exit when running on / with recursion
Date:
Tue, 12 Dec 2006 10:58:06 -0500
User-agent:
Mutt/1.5.11
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)
[Prev in Thread]
Current Thread
[Next in Thread]
--preserve-root warns but does not exit when running on / with recursion,
Matthew M. Boedicker<=