--- Kris Kennaway <kris@obsecurity.org> wrote:> On Sun, Apr 17, 2005 at 08:48:37PM -0700, Rob wrote: > > > > Hi, > > > > I noticed that 'random.ko' module is required > > by ssh, especially when running the server sshd. > > However, the sshd script in /etc/rc.d does not > > verify the pressence of the random.ko module and > > neither loads it if necessary. Shouldn't that be > > added? > > > > I bring this up, since I have observed that the > > nfsserver.ko module is automagically loaded by the > > /etc/rc.d/nfsserver script. > > > > Both cases seem to have some similarity. > > Sounds like a great opportunity to submit a patch! > :)Should I submit a patch here? Following patch works fine for me (be aware some lines are wrapped :[ ) --- /etc/rc.d/sshd Sun Oct 10 18:50:54 2004 +++ /etc/rc.d/sshd Tue Apr 19 15:56:12 2005 @@ -80,6 +80,14 @@ sshd_precmd() { + if ! ${SYSCTL} kern.random >/dev/null 2>&1; then + if ! kldload random; then + warn 'Could not load random module' + return 1 + fi + fi + if [ ! -f /etc/ssh/ssh_host_key -o \ ! -f /etc/ssh/ssh_host_dsa_key -o \ ! -f /etc/ssh/ssh_host_rsa_key ]; then __________________________________ Do you Yahoo!? Make Yahoo! your home page http://www.yahoo.com/r/hs
Daniel O'Connor
2005-Apr-19 00:37 UTC
[PATCH] Re: /etc/rc.d/sshd : "kldload random" missing?
On Tue, 19 Apr 2005 16:43, Rob wrote:> Should I submit a patch here? > > Following patch works fine for me > (be aware some lines are wrapped :[ )I think a more correct solution would be to make a 'random' rc.d script which sshd depends on (and others if they're found to need it) -- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 187 bytes Desc: not available Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20050419/cee865ee/attachment.bin