comparison svr-main.c @ 278:e109fb08b8ee

merge of 4cbdd6e0a0d8c061075b9ed7609a06c4547f67d3 and 5d396842815593611f0d61762440145d1fc74d5a
author Matt Johnston <matt@ucc.asn.au>
date Wed, 08 Mar 2006 12:53:09 +0000
parents 3be7ae2e8dfa
children 1f5ec029dfe8
comparison
equal deleted inserted replaced
276:3cea9d789cca 278:e109fb08b8ee
81 81
82 struct sockaddr_storage remoteaddr; 82 struct sockaddr_storage remoteaddr;
83 int remoteaddrlen; 83 int remoteaddrlen;
84 char * addrstring = NULL; 84 char * addrstring = NULL;
85 85
86 /* Set up handlers, syslog */ 86 /* Set up handlers, syslog, seed random */
87 commonsetup(); 87 commonsetup();
88 88
89 remoteaddrlen = sizeof(remoteaddr); 89 remoteaddrlen = sizeof(remoteaddr);
90 if (getpeername(0, (struct sockaddr*)&remoteaddr, &remoteaddrlen) < 0) { 90 if (getpeername(0, (struct sockaddr*)&remoteaddr, &remoteaddrlen) < 0) {
91 dropbear_exit("Unable to getpeername: %s", strerror(errno)); 91 dropbear_exit("Unable to getpeername: %s", strerror(errno));
357 } 357 }
358 358
359 /* Now we can setup the hostkeys - needs to be after logging is on, 359 /* Now we can setup the hostkeys - needs to be after logging is on,
360 * otherwise we might end up blatting error messages to the socket */ 360 * otherwise we might end up blatting error messages to the socket */
361 loadhostkeys(); 361 loadhostkeys();
362
363 seedrandom();
362 } 364 }
363 365
364 /* Set up listening sockets for all the requested ports */ 366 /* Set up listening sockets for all the requested ports */
365 static int listensockets(int *sock, int sockcount, int *maxfd) { 367 static int listensockets(int *sock, int sockcount, int *maxfd) {
366 368