summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2013-04-19 17:17:13 +0000
committerThierry Vignaud <tv@mageia.org>2013-04-19 17:17:13 +0000
commitb2b6c3a83abcafd37eae00354c3cf14f0472869c (patch)
tree8f4aed319cf6ec442319682744aa8868c020b977
parente3fc98f4aa9266398c4a8fc312574a8f61814892 (diff)
downloaddrakx-backup-do-not-use-b2b6c3a83abcafd37eae00354c3cf14f0472869c.tar
drakx-backup-do-not-use-b2b6c3a83abcafd37eae00354c3cf14f0472869c.tar.gz
drakx-backup-do-not-use-b2b6c3a83abcafd37eae00354c3cf14f0472869c.tar.bz2
drakx-backup-do-not-use-b2b6c3a83abcafd37eae00354c3cf14f0472869c.tar.xz
drakx-backup-do-not-use-b2b6c3a83abcafd37eae00354c3cf14f0472869c.zip
fix losing crypt key when activating inactive partitions (mga#5661)
-rw-r--r--perl-install/NEWS1
-rw-r--r--perl-install/diskdrake/interactive.pm12
-rw-r--r--perl-install/install/NEWS1
3 files changed, 13 insertions, 1 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index efb0cbf15..dee5ce3c8 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,4 +1,5 @@
- diskdrake (mga#5661):
+ o fix loosing crypt key when detecting LVMs on top of dmcrypt
o fix loosing crypt key when re-reading partition tables
- drakauth:
o 'nss-pam-ldapd' obsoletes 'pam_ldap' (mga#9769)
diff --git a/perl-install/diskdrake/interactive.pm b/perl-install/diskdrake/interactive.pm
index 8a4d9bb9c..b1d6809cc 100644
--- a/perl-install/diskdrake/interactive.pm
+++ b/perl-install/diskdrake/interactive.pm
@@ -954,8 +954,18 @@ sub dmcrypt_open {
delete $part->{dmcrypt_key};
die(($? >> 8) == 255 ? N("Invalid key") : $@);
}
- # Detect LVMs on top of dmcrypt
+ detect_lvms_on_dmcrypt($all_hds);
+}
+
+# Detect LVMs on top of dmcrypt
+sub detect_lvms_on_dmcrypt {
+ my ($all_hds) = @_,
+ require File::Temp;
+ my (undef, $tmp_file) = File::Temp::mkstemp('/tmp/crypttab.XXXXXXX');
+ fs::dmcrypt::save_crypttab_($all_hds, $tmp_file);
$all_hds->{lvms} = [ fsedit::lvms($all_hds) ];
+ fs::dmcrypt::read_crypttab_($all_hds, $tmp_file);
+ rm_rf($tmp_file);
}
sub Add2RAID {
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS
index 6c88c98d1..f729b6a68 100644
--- a/perl-install/install/NEWS
+++ b/perl-install/install/NEWS
@@ -1,6 +1,7 @@
- authentication:
o 'nss-pam-ldapd' obsoletes 'pam_ldap' (mga#9769)
- partionning (mga#5661):
+ o fix loosing crypt key when detecting LVMs on top of dmcrypt
o fix loosing crypt key when re-reading partition tables
Version 15.39 - 15 April 2013