Using the trial internal entropy gathering routines Damien so
kindly provided, I noticed stuff happening slowly. I think I've
traced this to the 'ls -alni /var/mail' taking a long time.
Given that this is likely to hurt a few sites similar to mine
(large number of users with an NFS-mounted /var/mail directory) is
it sensible to put a configure option in to disable this part?
I attach a patch to do this. It adds a configure option,
--without-lsmail. I'm not terribly happy with its name and I
haven't patched any of the docs.
Thanks,
Andrew Stribblehill
Systems Programmer, IT Service, University of Durham, England.
-------------- next part --------------
diff --exclude=configure --exclude=config.h.in -c openssh-1.2.3test2/acconfig.h
openssh-1.2.3test2+/acconfig.h
*** openssh-1.2.3test2/acconfig.h Mon Apr 3 05:50:44 2000
--- openssh-1.2.3test2+/acconfig.h Mon Apr 10 14:09:51 2000
***************
*** 135,140 ****
--- 135,143 ----
/* Specify default $PATH */
#undef USER_PATH
+ /* Define if you want to supress listing of mail dir for entropy gathering */
+ #undef DISABLE_LSMAIL
+
/* Specify location of ssh.pid */
#undef PIDDIR
diff --exclude=configure --exclude=config.h.in -c
openssh-1.2.3test2/configure.in openssh-1.2.3test2+/configure.in
*** openssh-1.2.3test2/configure.in Mon Apr 3 06:57:06 2000
--- openssh-1.2.3test2+/configure.in Mon Apr 10 12:14:29 2000
***************
*** 833,838 ****
--- 833,849 ----
]
)
+ # Whether to supress listing /var/(spool/)?mail for entropy gathering
+ AC_ARG_WITH(lsmail,
+ [ --without-lsmail Supress ls of mail dir ],
+ [
+ if test "x$withval" = "xno" ; then
+ no_lsmail=1
+ AC_DEFINE(DISABLE_LSMAIL)
+ fi
+ ]
+ )
+
# Whether to force IPv4 by default (needed on broken glibc Linux)
AC_ARG_WITH(ipv4-default,
[ --with-ipv4-default Use IPv4 by connections unless '-6'
specified],
Common subdirectories: openssh-1.2.3test2/contrib and
openssh-1.2.3test2+/contrib
diff --exclude=configure --exclude=config.h.in -c openssh-1.2.3test2/entropy.c
openssh-1.2.3test2+/entropy.c
*** openssh-1.2.3test2/entropy.c Mon Apr 3 06:07:32 2000
--- openssh-1.2.3test2+/entropy.c Mon Apr 10 12:15:37 2000
***************
*** 140,147 ****
--- 140,149 ----
#ifdef PROG_LS
{ 0.002, PROG_LS, { "ls", "-alni",
"/var/log", NULL } },
{ 0.002, PROG_LS, { "ls", "-alni",
"/var/adm", NULL } },
+ #ifndef DISABLE_LSMAIL
{ 0.002, PROG_LS, { "ls", "-alni",
"/var/mail", NULL } },
{ 0.002, PROG_LS, { "ls", "-alni",
"/var/spool/mail", NULL } },
+ #endif
{ 0.002, PROG_LS, { "ls", "-alni",
"/proc", NULL } },
{ 0.002, PROG_LS, { "ls", "-alni",
"/tmp", NULL } },
#endif