[Merge] lp:~cezary0/cryptsetup/bugfix474258_refactored into lp:~ubuntu-core-dev/cryptsetup/ubuntu
Cezary Baginski
trzareq at gmail.com
Tue Feb 7 07:53:20 UTC 2012
Cezary Baginski has proposed merging lp:~cezary0/cryptsetup/bugfix474258_refactored into lp:~ubuntu-core-dev/cryptsetup/ubuntu.
Requested reviews:
Ubuntu Core Development Team (ubuntu-core-dev)
Related bugs:
Bug #474258 in cryptsetup (Ubuntu): "Extremely dangerous! cryptswap killed my partition"
https://bugs.launchpad.net/ubuntu/+source/cryptsetup/+bug/474258
For more details, see:
https://code.launchpad.net/~cezary0/cryptsetup/bugfix474258_refactored/+merge/91775
I refactored the code for clarity and fixed the error in the condition:
if ! pre_out=$("$PRECHECK" "$src" 2> /dev/null) && \
[ "$MAKESWAP" != "yes" ] && \
! /lib/cryptsetup/checks/blkid "$src" swap >/dev/null; then
log_warning_msg "$dst: the precheck for '$src' failed: $pre_out"
The error was introduced here (Debian):
http://anonscm.debian.org/viewvc/pkg-cryptsetup/cryptsetup/trunk/debian/cryptdisks.functions?r1=384&r2=388
in short the current bad condition:
if has_a_filesystem and ! for_cryptswap and ! swap -> then fail
should have been:
if has_a_filesystem and !( for_cryptswap and swap) -> then fail
I made other changes based on feedback here:
https://code.launchpad.net/~cezary0/cryptsetup/bugfix474258/+merge/91560
and I created a small test suite to test the changes and refactored code. During this, I found a similar bug/condition for the encrypted tmp handling - and fixed it too.
The tests are messy but useful and can easily be extended to cover more edge cases.
--
https://code.launchpad.net/~cezary0/cryptsetup/bugfix474258_refactored/+merge/91775
Your team Ubuntu Core Development Team is requested to review the proposed merge of lp:~cezary0/cryptsetup/bugfix474258_refactored into lp:~ubuntu-core-dev/cryptsetup/ubuntu.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: review-diff.txt
Type: text/x-diff
Size: 9595 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-reviews/attachments/20120207/f73eebd0/attachment.diff>
More information about the Ubuntu-reviews
mailing list