Page MenuHomeFreeBSD

D19742.id55613.diff
No OneTemporary

D19742.id55613.diff

Index: libexec/rc/rc.d/random
===================================================================
--- libexec/rc/rc.d/random
+++ 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: libexec/save-entropy/save-entropy.sh
===================================================================
--- libexec/save-entropy/save-entropy.sh
+++ 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, Feb 9, 10:45 AM (15 h, 45 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28570361
Default Alt Text
D19742.id55613.diff (1 KB)

Event Timeline