Remove uneeded check in luksFormat to allow operation as normal user.

This commit is contained in:
Milan Broz
2014-06-28 15:23:04 +02:00
parent 803686ea4b
commit d5b594dd12

View File

@@ -1030,11 +1030,6 @@ static int _crypt_format_luks1(struct crypt_device *cd,
&required_alignment,
&alignment_offset, DEFAULT_DISK_ALIGNMENT);
/* Check early if we cannot allocate block device for key slot access */
r = device_block_adjust(cd, cd->device, DEV_OK, 0, NULL, NULL);
if(r < 0)
return r;
r = LUKS_generate_phdr(&cd->u.luks1.hdr, cd->volume_key, cipher, cipher_mode,
(params && params->hash) ? params->hash : "sha1",
uuid, LUKS_STRIPES,