assembled a buffer from multiple dir blocks, and we can use that in
obfuscate_dir_data_block() to continue past the first filesystem block
and continue obfuscating the entire thing.
Without this, anything after the first block was skipped, and
remained as cleartext.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
datahdr = (struct xfs_dir2_data_hdr *)block;
- if (offset % mp->m_dirblkfsbs != 0)
- return; /* corrupted, leave it alone */
-
if (is_block_format) {
xfs_dir2_leaf_entry_t *blp;
xfs_dir2_block_tail_t *btp;
dir_offset = xfs_dir3_data_entry_offset(datahdr);
ptr = block + dir_offset;
- endptr = block + mp->m_sb.sb_blocksize;
+ endptr = block + mp->m_dirblksize;
while (ptr < endptr && dir_offset < end_of_data) {
xfs_dir2_data_entry_t *dep;