Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Mar 2005 17:00:22 -0500
From:      Ed Maste <emaste@phaedrus.sandvine.ca>
To:        freebsd-current@freebsd.org
Subject:   Random source seeding and /etc/rc.d/sshd host key generation
Message-ID:  <20050328220022.GB17716@sandvine.com>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050328220022.GB17716>