]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_metadump: obfuscate remote symlinks on CRC filesystems
authorEric Sandeen <sandeen@redhat.com>
Wed, 29 Jul 2015 23:17:43 +0000 (09:17 +1000)
committerDave Chinner <david@fromorbit.com>
Wed, 29 Jul 2015 23:17:43 +0000 (09:17 +1000)
commit80917c1a0df4f940ac996ecdb142809860dd04c9
tree03addf0be75653df5a4b2b3bc2828c2dbcb18c28
parent37a78181fb35867df62e80e2edd932b58a2729ef
xfs_metadump: obfuscate remote symlinks on CRC filesystems

On CRC filesystems, the symlink block starts with a header,
which contains magic, "XLSM"

The code happens to "work" today w/o corrupting anything,
because it seems "XSLM" as a string, decides it's too short
to obfuscate, and leaves it alone.

But the real symlink target is untouched.  Fix that by moving
the pointer to the string we want to obfuscate by the size
of the header, and shorten the length to obfuscate accordingly.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>
db/metadump.c