The alternative suggested for /entropy as a shutdown
save file was /var/db/entropy, which also happens to be the directory where the individual entropy files created by /usr/libexec/save-entropy are stored. Change the suggestion to be /var/db/entropy-file instead. In an error condition where the shutdown file is not created, the error message accessed a variable that doesn't exist. PR: conf/75722 Submitted by: Nicolas Rachinsky <list@rachinsky.de>
This commit is contained in:
parent
ca44abece9
commit
f297a20e30
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=144891
@ -459,7 +459,7 @@ kern_securelevel="-1" # range: -1..3 ; `-1' is the most insecure
|
||||
update_motd="YES" # update version info in /etc/motd (or NO)
|
||||
unaligned_print="YES" # print unaligned access warnings on the alpha (or NO).
|
||||
entropy_file="/entropy" # Set to NO to disable caching entropy through reboots.
|
||||
# /var/db/entropy is preferred if / is not available.
|
||||
# /var/db/entropy-file is preferred if / is not avail.
|
||||
entropy_dir="/var/db/entropy" # Set to NO to disable caching entropy via cron.
|
||||
entropy_save_sz="2048" # Size of the entropy cache files.
|
||||
entropy_save_num="8" # Number of entropy cache files to save.
|
||||
|
@ -68,15 +68,14 @@ random_stop()
|
||||
else
|
||||
# Try this as a reasonable alternative for read-only
|
||||
# roots, diskless workstations, etc.
|
||||
rm -f /var/db/entropy
|
||||
if touch /var/db/entropy; then
|
||||
entropy_file_confirmed=/var/db/entropy
|
||||
rm -f /var/db/entropy-file
|
||||
if touch /var/db/entropy-file; then
|
||||
entropy_file_confirmed=/var/db/entropy-file
|
||||
fi
|
||||
fi
|
||||
case ${entropy_file_confirmed} in
|
||||
'')
|
||||
err 1 '${entropy_file_confirmed}:' \
|
||||
' entropy file write failed.'
|
||||
err 1 'entropy file write failed.'
|
||||
;;
|
||||
*)
|
||||
dd if=/dev/random of=${entropy_file_confirmed} \
|
||||
|
Loading…
Reference in New Issue
Block a user