Problems/patches for BSD/OS 4.0.1

Larry Jones larry.jones at sdrc.com
Tue Sep 12 08:21:15 EST 2000


Two small problems with 2.2.0p1 on BSD/OS 4.0.1, both invoving the
internal entropy collector:

1) The ``ls'' commands in ssh_prng_cmds.in all use -n, which isn't valid
on BSD/OS and thus caused them all to fail when fixprogs checked them. 
BSD/OS does, however, have a -T flag which gives complete timestamp
information (month, day, year, hour, minute, and second), which seems
like a useful addition.  I suspect the configure script should be
enhanced to deal with this, but I don't know enough about configure to
suggest a patch.

2) The fixprogs script doesn't reopen the child process's STDIN, STDOUT,
and STDERR correctly.  This caused all of the ``tail'' commands in
ssh_prng_cmds to fail because they couldn't write to stdout.  Here's a
patch:

--- fixprogs.orig	Thu May 18 09:12:50 2000
+++ fixprogs	Mon Sep 11 16:57:42 2000
@@ -44,9 +44,9 @@
    if (! ($pid = fork())) {
      # child
      close STDIN; close STDOUT; close STDERR;
-     open STDIN,  "</dev/null";
-     open STDOUT, ">/dev/null";
-     open STDERR, ">/dev/null";
+     open (STDIN,  "</dev/null");
+     open (STDOUT, ">/tmp/foo");
+     open (STDERR, ">/dev/null");
      exec $path @args;
      exit 1; # shouldn't be here
    }

Neither of these would have been fatal alone, but together they reduced
the number of available entropy sources to 15, one less than the
required minimum of 16, which caused the PRNG initialization to fail.

-Larry Jones

In short, open revolt and exile is the only hope for change? -- Calvin





More information about the openssh-unix-dev mailing list