]> err.no Git - systemd/commit
cryptsetup: fix keyfile size option processing systemctl_mask
authorMilan Broz <mbroz@redhat.com>
Mon, 25 Apr 2011 22:15:15 +0000 (00:15 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 26 Apr 2011 19:50:15 +0000 (21:50 +0200)
commit2d745456b2852d102e6f27f685c97118f2190669
treebed2ca2f4fbd833c2b008f449589ba30ba149a6e
parent641e01dcdcc810026ee4156d1694d97e10a1ba07
cryptsetup: fix keyfile size option processing

/etc/crypttab uses "size" argument only for plain crypt mapping
(and input is limited to volume key size)

For LUKS it always read whole keyfile (no arguments except "luks"
should be in crypttab).

Because of bug in cryptsetup 1.2.0 (fixed in 1.3.0) library
did not enforced keyfile size argument, so this bug was
hidden for some time.

Patch also converts size in bits to bytes like excepted
by libcryptsetup api.

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=36264
src/cryptsetup.c