mirror of
https://github.com/clearml/dropbear
synced 2025-06-26 18:17:32 +00:00
Only read /dev/random once when the program starts
rather than for every connection, to "conserve entropy". --HG-- extra : convert_revision : 21df240b71c0af8454725dec9abb428dd4bb97a2
This commit is contained in:
@@ -83,7 +83,7 @@ static void main_inetd() {
|
||||
int remoteaddrlen;
|
||||
char * addrstring = NULL;
|
||||
|
||||
/* Set up handlers, syslog */
|
||||
/* Set up handlers, syslog, seed random */
|
||||
commonsetup();
|
||||
|
||||
remoteaddrlen = sizeof(remoteaddr);
|
||||
@@ -359,6 +359,8 @@ static void commonsetup() {
|
||||
/* Now we can setup the hostkeys - needs to be after logging is on,
|
||||
* otherwise we might end up blatting error messages to the socket */
|
||||
loadhostkeys();
|
||||
|
||||
seedrandom();
|
||||
}
|
||||
|
||||
/* Set up listening sockets for all the requested ports */
|
||||
|
||||
Reference in New Issue
Block a user