summaryrefslogtreecommitdiff
path: root/image/sanitize.h
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2017-10-20 01:01:43 +0200
committerDavid Sterba <dsterba@suse.com>2017-11-14 15:59:00 +0100
commit6e43cc2e97aee62dec65c073143e38f3f8cafae8 (patch)
tree8fc092712d0fd28144cd7090ab0a128e2949b938 /image/sanitize.h
parent095d143afaef655aac22e91a89effb977b22f0e6 (diff)
btrfs-progs: image: introduce symbolic names for the sanitization modes
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'image/sanitize.h')
-rw-r--r--image/sanitize.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/image/sanitize.h b/image/sanitize.h
index b979f813..fa7db517 100644
--- a/image/sanitize.h
+++ b/image/sanitize.h
@@ -27,4 +27,18 @@ struct name {
u32 len;
};
+/*
+ * Filenames and xattrs can be obfuscated so they don't appear in the image
+ * dump. In basic mode (NAMES) a random string will be generated but such names
+ * do not match the direntry hashes. The advanced mode (COLLISIONS) tries to
+ * generate names that appear random but also match the hashes. This however
+ * may take significantly more time than the basic mode. And may not even
+ * succeed.
+ */
+enum sanitize_mode {
+ SANITIZE_NONE,
+ SANITIZE_NAMES,
+ SANITIZE_COLLISIONS
+};
+
#endif