Mercurial > dropbear
diff svr-chansession.c @ 272:3be7ae2e8dfa
Only read /dev/random once when the program starts
rather than for every connection, to "conserve entropy".
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sat, 11 Feb 2006 15:15:37 +0000 |
parents | 541b14504870 |
children | 8438ff0cdb74 |
line wrap: on
line diff
--- a/svr-chansession.c Wed Feb 01 09:05:13 2006 +0000 +++ b/svr-chansession.c Sat Feb 11 15:15:37 2006 +0000 @@ -833,7 +833,7 @@ svr_opts.hostkey = NULL; /* overwrite the prng state */ - seedrandom(); + reseedrandom(); /* close file descriptors except stdin/stdout/stderr * Need to be sure FDs are closed here to avoid reading files as root */