Date: Wed, 22 Aug 2012 23:37:24 +0000 (UTC) From: "David E. O'Brien" <obrien@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r239598 - head/etc/rc.d Message-ID: <201208222337.q7MNbORo017642@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: obrien Date: Wed Aug 22 23:37:24 2012 New Revision: 239598 URL: http://svn.freebsd.org/changeset/base/239598 Log: * Reinstate r128059's consumption of our best entropy first. r128060 for "hardware-supplied entropy" reversed this without reason, seems a typo. * Isolate "better than nothing" implementation to a function. Submitted by: obrien & Arthur Mesh <arthurmesh@gmail.com> Sponsored by: Juniper Networks Modified: head/etc/rc.d/initrandom Modified: head/etc/rc.d/initrandom ============================================================================== --- head/etc/rc.d/initrandom Wed Aug 22 22:48:50 2012 (r239597) +++ head/etc/rc.d/initrandom Wed Aug 22 23:37:24 2012 (r239598) @@ -21,6 +21,17 @@ feed_dev_random() fi } +better_than_nothing() +{ + # XXX temporary until we can improve the entropy + # harvesting rate. + # Entropy below is not great, but better than nothing. + # This unblocks the generator at startup + ( ps -fauxww; sysctl -a; date; df -ib; dmesg; ps -fauxww ) \ + | dd of=/dev/random bs=8k 2>/dev/null + cat /bin/ls | dd of=/dev/random bs=8k 2>/dev/null +} + initrandom_start() { soft_random_generator=`sysctl kern.random 2>/dev/null` @@ -52,14 +63,6 @@ initrandom_start() fi fi - # XXX temporary until we can improve the entropy - # harvesting rate. - # Entropy below is not great, but better than nothing. - # This unblocks the generator at startup - ( ps -fauxww; sysctl -a; date; df -ib; dmesg; ps -fauxww ) \ - | dd of=/dev/random bs=8k 2>/dev/null - cat /bin/ls | dd of=/dev/random bs=8k 2>/dev/null - # First pass at reseeding /dev/random. # case ${entropy_file} in @@ -72,6 +75,8 @@ initrandom_start() ;; esac + better_than_nothing() + echo -n ' kickstart' fi
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208222337.q7MNbORo017642>