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

Ed Maste emaste at phaedrus.sandvine.ca
Mon Mar 28 14:00:24 PST 2005


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


More information about the freebsd-current mailing list