Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108626704
D19742.id55641.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D19742.id55641.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D19742: random(4): Attempt to persist entropy promptly
Attached
Detach File
Event Timeline
Log In to Comment