mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-31 16:57:10 +00:00
Tighten /entropy permissions.
PR: 219527 Reported by: Lu Tung-Pin <lutungpin at openmailbox.org> Submitted by: jilles MFC after: 3 days
This commit is contained in:
parent
ef7161e774
commit
335917f071
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=318975
@ -20,12 +20,14 @@ saveseed_cmd="${name}_stop"
|
||||
|
||||
save_dev_random()
|
||||
{
|
||||
oumask=`umask`
|
||||
umask 077
|
||||
for f ; do
|
||||
if :>>"$f" ; then
|
||||
debug "saving entropy to $f"
|
||||
dd if=/dev/random of="$f" bs=4096 count=1 2>/dev/null
|
||||
fi
|
||||
debug "saving entropy to $f"
|
||||
dd if=/dev/random of="$f" bs=4096 count=1 status=none &&
|
||||
chmod 600 "$f"
|
||||
done
|
||||
umask ${oumask}
|
||||
}
|
||||
|
||||
feed_dev_random()
|
||||
|
Loading…
Reference in New Issue
Block a user