summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-12-05 13:04:23 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-12-05 13:04:23 +0000
commitfc07f3130df2e7c456ff1e68809f394ba55833df (patch)
treed60abec64150537190b75a94142757b067007103
parent06ea4d5d19117ce7b68b870f1e2cb96d7608a71e (diff)
downloaddrakx-fc07f3130df2e7c456ff1e68809f394ba55833df.tar
drakx-fc07f3130df2e7c456ff1e68809f394ba55833df.tar.gz
drakx-fc07f3130df2e7c456ff1e68809f394ba55833df.tar.bz2
drakx-fc07f3130df2e7c456ff1e68809f394ba55833df.tar.xz
drakx-fc07f3130df2e7c456ff1e68809f394ba55833df.zip
- finish-install
o use /dev/urandom instead of /dev/random to generate salt for passwords (since reading on /dev/random can block boot process) (bug found/fixed by blino) (backported from trunk)
-rw-r--r--perl-install/NEWS4
-rw-r--r--perl-install/authentication.pm2
2 files changed, 5 insertions, 1 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index 945f853a8..12f764c4f 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,3 +1,7 @@
+- finish-install
+ o use /dev/urandom instead of /dev/random to generate salt for passwords
+ (since reading on /dev/random can block boot process)
+
Version 11.71.1 - 5 December 2008
- handle new driver:
diff --git a/perl-install/authentication.pm b/perl-install/authentication.pm
index 716128e49..06b718ea2 100644
--- a/perl-install/authentication.pm
+++ b/perl-install/authentication.pm
@@ -815,7 +815,7 @@ sub enable_shadow() {
sub salt {
my ($nb) = @_;
require devices;
- open(my $F, devices::make("random")) or die "missing random";
+ open(my $F, devices::make("urandom")) or die "missing urandom";
my $s; read $F, $s, $nb;
$s = pack("b8" x $nb, unpack "b6" x $nb, $s);
$s =~ tr|\0-\x3f|0-9a-zA-Z./|;