diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2000-10-27 06:36:36 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2000-10-27 06:36:36 +0000 |
commit | 89207aa6e43f275bf85da886ea860bc920908637 (patch) | |
tree | d383f1d3f8d6bdd03ebd45e237abd168bd02e479 /etc | |
parent | 7533b526e26fe8b35b04e88272f8a600452191c4 (diff) |
after seeding from the host.random file, immediately reset the seed file, so
that if a shutdown-less reboot occurs, the next re-seed is not a repeat
Diffstat (limited to 'etc')
-rw-r--r-- | etc/rc | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -1,4 +1,4 @@ -# $OpenBSD: rc,v 1.156 2000/10/18 21:28:54 mickey Exp $ +# $OpenBSD: rc,v 1.157 2000/10/27 06:36:35 deraadt Exp $ # System startup script run by init on autoboot # or after single-user. @@ -142,6 +142,11 @@ else > /dev/null 2>&1 fi +# reset seed file, so that if a shutdown-less reboot occurs, +# the next seed is not a repeat +dd if=/dev/urandom of=/var/db/host.random bs=1024 count=64 \ + > /dev/null 2>&1 + # clean up left-over files rm -f /etc/nologin rm -f /var/spool/lock/LCK.* |