Page MenuHomeFreeBSD

D19742.id55641.diff
No OneTemporary

D19742.id55641.diff

Index: head/libexec/rc/rc.d/random
===================================================================
--- head/libexec/rc/rc.d/random
+++ head/libexec/rc/rc.d/random
@@ -25,7 +25,8 @@
for f ; do
debug "saving entropy to $f"
dd if=/dev/random of="$f" bs=4096 count=1 status=none &&
- chmod 600 "$f"
+ chmod 600 "$f" &&
+ fsync "$f" "$(dirname "$f")"
done
umask ${oumask}
}
@@ -120,6 +121,9 @@
dd if=/dev/random of=${entropy_file_confirmed} \
bs=4096 count=1 2> /dev/null ||
warn 'write failed (unwriteable file or full fs?)'
+ fsync "${entropy_file_confirmed}" \
+ "$(dirname "${entropy_file_confirmed}")" \
+ 2> /dev/null
echo '.'
;;
esac
@@ -145,6 +149,9 @@
dd if=/dev/random of=${entropy_boot_file_confirmed} \
bs=4096 count=1 2> /dev/null ||
warn 'write failed (unwriteable file or full fs?)'
+ fsync "${entropy_boot_file_confirmed}" \
+ "$(dirname "${entropy_boot_file_confirmed}")" \
+ 2> /dev/null
echo '.'
;;
esac
Index: head/libexec/save-entropy/save-entropy.sh
===================================================================
--- head/libexec/save-entropy/save-entropy.sh
+++ head/libexec/save-entropy/save-entropy.sh
@@ -90,5 +90,6 @@
done
dd if=/dev/random of=saved-entropy.1 bs=${entropy_save_sz} count=1 2>/dev/null
+fsync saved-entropy.1 "."
exit 0

File Metadata

Mime Type
text/plain
Expires
Mon, Jan 27, 11:27 PM (9 h, 27 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16185487
Default Alt Text
D19742.id55641.diff (1 KB)

Event Timeline