lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 21 Mar 2019 16:25:10 -0400
From:   "Theodore Ts'o" <>
To:     Ext4 Developers List <>
        "Theodore Ts'o" <>
Subject: [PATCH 6/9] e2scrub_all: add the -n option which shows what e2scrub_all would do

Also fix the copyright symbol so it is properly formatted when
processed into postscript or pdf.

Signed-off-by: Theodore Ts'o <>
 scrub/ | 17 ++++++++++++++---
 scrub/   |  8 +++++---
 2 files changed, 19 insertions(+), 6 deletions(-)

diff --git a/scrub/ b/scrub/
index ba3b8735e..e2cd5e44a 100644
--- a/scrub/
+++ b/scrub/
@@ -20,12 +20,23 @@ See the
 manual page for more information about how the checking is performed.
-Scrub all ext[234] filesystems even if they are not mounted.
+Print what commands
+.B e2scrub_all
+would execute to initiate the e2scrub operations.
+(Note: these commands will not actually be executed; however, since
+.B e2scrub_all
+needs to run some additional, privileged commands to query the
+system to determine which
+.B e2scrub
+commands would be executed, it still needs to be run as root.)
 Remove e2scrub snapshots but do not check anything.
+Scrub all ext[234] filesystems even if they are not mounted.
 Print version information and exit.
@@ -33,4 +44,4 @@ Print version information and exit.
 Darrick J. Wong <>
-Copyright ©2018 Oracle.  License is GPLv2+. <>
+Copyright \[co]2018 Oracle.  License is GPLv2+. <>
diff --git a/scrub/ b/scrub/
index d725a7f2e..8bc868aa0 100644
--- a/scrub/
+++ b/scrub/
@@ -29,8 +29,9 @@ scrub_args=""
 print_help() {
 	echo "Usage: $0 [OPTIONS]"
-	echo " -A: Scrub all ext[234] filesystems even if not mounted."
+	echo " -n: Show what commands e2scrub_all would execute."
 	echo " -r: Remove e2scrub snapshots."
+	echo " -A: Scrub all ext[234] filesystems even if not mounted."
 	echo " -V: Print version information and exit."
@@ -60,10 +61,11 @@ exitcode() {
 	exit "${ret}"
-while getopts "ArV" opt; do
+while getopts "nrAV" opt; do
 	case "${opt}" in
-	"A") scrub_all=1;;
+	"n") DBG="echo Would execute: " ;;
 	"r") scrub_args="${scrub_args} -r";;
+	"A") scrub_all=1;;
 	"V") print_version; exitcode 0;;
 	*) print_help; exitcode 2;;

Powered by blists - more mailing lists