Wipe start of device before LUKS-formatting.
authorMilan Broz <gmazyland@gmail.com>
Wed, 5 Nov 2008 11:23:24 +0000 (11:23 +0000)
committerMilan Broz <gmazyland@gmail.com>
Wed, 5 Nov 2008 11:23:24 +0000 (11:23 +0000)
commit29640eec720218f24a128e126392f54f26100110
tree383f501dd6abb0eb05132c4f939e61ec0146ea2b
parent56daf93a0ef40a908f3f61ae9da37f8072541e5e
Wipe start of device before LUKS-formatting.

Cryptsetup keeps some sectors (between the physical LUKS header
and keyslot data) on disk untouched, unfortunatelly ext2/3/4 signature can
be there and blkid detects filesystem here instead of LUKS.

This patch wipes the first eight sectors on disk with zero during luksFormat.
This should be probably solved by physical header padding in next version.

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@38 36d66b0a-2a48-0410-832c-cd162a569da5
lib/setup.c