From 7c51f30621e904a6137a156f4e73a6209d648714 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 17 Jan 2002 13:37:53 +0000 Subject: check the mountpoint is valid for encrypting (disallow "/" and "/usr") --- perl-install/fsedit.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm index 90554f509..449893e8b 100644 --- a/perl-install/fsedit.pm +++ b/perl-install/fsedit.pm @@ -474,7 +474,7 @@ sub check_mntpoint { $mntpoint eq '' || isSwap($part) || isNonMountable($part) and return; $mntpoint =~ m|^/| or die _("Mount points must begin with a leading /"); - has_mntpoint($mntpoint, $all_hds) and die _("There is already a partition with mount point %s\n", $mntpoint); + $mntpoint ne $part->{mntpoint} && has_mntpoint($mntpoint, $all_hds) and die _("There is already a partition with mount point %s\n", $mntpoint); die "raid / with no /boot" if $mntpoint eq "/" && isRAID($part) && !has_mntpoint("/boot", $all_hds); @@ -484,6 +484,8 @@ sub check_mntpoint { if member($mntpoint, qw(/bin /dev /etc /lib /sbin)); die _("You need a true filesystem (ext2, reiserfs) for this mount point\n") if !isTrueFS($part) && member($mntpoint, qw(/ /home /tmp /usr /var)); + die _("You can't use an encrypted file system for mount point %s", $mntpoint) + if $part->{options} =~ /encrypted/ && member($mntpoint, qw(/ /usr)); local $part->{mntpoint} = $mntpoint; loopback::check_circular_mounts($hd, $part, $all_hds); -- cgit v1.2.1