diff options
Diffstat (limited to 'sshd.c')
-rw-r--r-- | sshd.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sshd.c,v 1.352 2007/12/27 14:22:08 dtucker Exp $ */ | 1 | /* $OpenBSD: sshd.c,v 1.353 2007/12/31 15:27:04 dtucker Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -1599,10 +1599,6 @@ main(int ac, char **av) | |||
1599 | /* Get a connection, either from inetd or a listening TCP socket */ | 1599 | /* Get a connection, either from inetd or a listening TCP socket */ |
1600 | if (inetd_flag) { | 1600 | if (inetd_flag) { |
1601 | server_accept_inetd(&sock_in, &sock_out); | 1601 | server_accept_inetd(&sock_in, &sock_out); |
1602 | |||
1603 | if ((options.protocol & SSH_PROTO_1) && | ||
1604 | sensitive_data.server_key == NULL) | ||
1605 | generate_ephemeral_server_key(); | ||
1606 | } else { | 1602 | } else { |
1607 | server_listen(); | 1603 | server_listen(); |
1608 | 1604 | ||
@@ -1772,6 +1768,10 @@ main(int ac, char **av) | |||
1772 | 1768 | ||
1773 | sshd_exchange_identification(sock_in, sock_out); | 1769 | sshd_exchange_identification(sock_in, sock_out); |
1774 | 1770 | ||
1771 | /* In inetd mode, generate ephemeral key only for proto 1 connections */ | ||
1772 | if (!compat20 && inetd_flag && sensitive_data.server_key == NULL) | ||
1773 | generate_ephemeral_server_key(); | ||
1774 | |||
1775 | packet_set_nonblocking(); | 1775 | packet_set_nonblocking(); |
1776 | 1776 | ||
1777 | /* allocate authentication context */ | 1777 | /* allocate authentication context */ |