Random source seeding and /etc/rc.d/sshd host key generation

From: Ed Maste <emaste_at_phaedrus.sandvine.ca>
Date: Mon, 28 Mar 2005 17:00:22 -0500
In /etc/rc.d/sshd, user_reseed() does

seeded=`sysctl -n kern.random.sys.seeded 2>/dev/null`
    if [ "${seeded}" != "" ] ; then
        warn "Setting entropy source to blocking mode."
        echo "===================================================="
        echo "Type a full screenful of random junk to unblock"
        ...

I'm curious if checking the seeded sysctl against "" is intentional;
it seems $seeded will always be non-null.  Since user_reseed only
gets called if the host keys don't exist it probably won't be much
of an issue in practice, but it seems random junk will be requested
on the first boot even if the entropy source is already seeded.

-ed
Received on Mon Mar 28 2005 - 20:00:24 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:30 UTC