Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Apr 2005 00:13:05 -0700 (PDT)
From:      Rob <spamrefuse@yahoo.com>
To:        Kris Kennaway <kris@obsecurity.org>
Cc:        FreeBSD Stable <freebsd-stable@freebsd.org>
Subject:   [PATCH] Re: /etc/rc.d/sshd : "kldload random" missing?
Message-ID:  <20050419071305.60770.qmail@web54004.mail.yahoo.com>
In-Reply-To: 6667

next in thread | raw e-mail | index | archive | help

--- 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



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