comparison svr-main.c @ 1716:6ea18ca8fc03

Delay seedrandom until connections
author Matt Johnston <matt@ucc.asn.au>
date Mon, 15 Jun 2020 22:24:34 +0800
parents 3f80da5fe0b4
children 2b3a8026a6ce
comparison
equal deleted inserted replaced
1715:3974f087d9c0 1716:6ea18ca8fc03
78 78
79 #if INETD_MODE 79 #if INETD_MODE
80 static void main_inetd() { 80 static void main_inetd() {
81 char *host, *port = NULL; 81 char *host, *port = NULL;
82 82
83 /* Set up handlers, syslog, seed random */ 83 /* Set up handlers, syslog */
84 commonsetup(); 84 commonsetup();
85
86 seedrandom();
85 87
86 #if DEBUG_TRACE 88 #if DEBUG_TRACE
87 if (debug_trace) { 89 if (debug_trace) {
88 /* -v output goes to stderr which would get sent over the inetd network socket */ 90 /* -v output goes to stderr which would get sent over the inetd network socket */
89 dropbear_exit("Dropbear inetd mode is incompatible with debug -v"); 91 dropbear_exit("Dropbear inetd mode is incompatible with debug -v");
397 crypto_init(); 399 crypto_init();
398 400
399 /* Now we can setup the hostkeys - needs to be after logging is on, 401 /* Now we can setup the hostkeys - needs to be after logging is on,
400 * otherwise we might end up blatting error messages to the socket */ 402 * otherwise we might end up blatting error messages to the socket */
401 load_all_hostkeys(); 403 load_all_hostkeys();
402
403 seedrandom();
404 } 404 }
405 405
406 /* Set up listening sockets for all the requested ports */ 406 /* Set up listening sockets for all the requested ports */
407 static size_t listensockets(int *socks, size_t sockcount, int *maxfd) { 407 static size_t listensockets(int *socks, size_t sockcount, int *maxfd) {
408 408