[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: safety of encrypted filesystems



On Fri, 17 Jun 2005 12:30:58 +0200
martin f krafft <madduck@debian.org> wrote:

> Nope. Someone raised the point of a file with all zeroes being
> possibly sparse, but I don't think that's the case if I wrote it
> with
> 
>   dd if=/dev/zero of=file bs=8M count=1
> 
> right?

Right. This file contains 2^23 0x00's.
The other thing, mentioned, will happen with this code:

fd = open ("empty_file", O_WRONLY, 0666);
lseek (fd, 2^23, SEEK_SET);
write (fd, "?", 1);
close (fd);

ls -l will show 8 MB
du -a will show 1k

Maybe, you'll like to try bigger damages to the encrypted fs, until the
error correction breaks.
And maybe, fill the file in the fs from /dev/randon instead of
/dev/zero.

-- 
mit freundlichen Gruessen / with friendly regards
Michael Buchholz



Reply to: