diff options
-rw-r--r-- | readconf.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/readconf.c b/readconf.c index a6a160182..20f1c04ee 100644 --- a/readconf.c +++ b/readconf.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: readconf.c,v 1.324 2020/01/30 22:19:32 djm Exp $ */ | 1 | /* $OpenBSD: readconf.c,v 1.325 2020/02/03 23:47:57 djm 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 |
@@ -2110,19 +2110,8 @@ fill_default_options(Options * options) | |||
2110 | options->system_hostfiles[options->num_system_hostfiles++] = | 2110 | options->system_hostfiles[options->num_system_hostfiles++] = |
2111 | xstrdup(_PATH_SSH_SYSTEM_HOSTFILE2); | 2111 | xstrdup(_PATH_SSH_SYSTEM_HOSTFILE2); |
2112 | } | 2112 | } |
2113 | if (options->update_hostkeys == -1) { | 2113 | if (options->update_hostkeys == -1) |
2114 | /* | 2114 | options->update_hostkeys = SSH_UPDATE_HOSTKEYS_NO; |
2115 | * Enable UpdateHostKeys non-interactively if the user has | ||
2116 | * not overridden the default known_hosts selection, or has | ||
2117 | * overridden it with the default. Otherwise, prompt. | ||
2118 | */ | ||
2119 | if (options->num_user_hostfiles == 0 || | ||
2120 | (options->num_user_hostfiles == 1 && strcmp(options-> | ||
2121 | user_hostfiles[0], _PATH_SSH_USER_HOSTFILE) == 0)) | ||
2122 | options->update_hostkeys = SSH_UPDATE_HOSTKEYS_YES; | ||
2123 | else | ||
2124 | options->update_hostkeys = SSH_UPDATE_HOSTKEYS_ASK; | ||
2125 | } | ||
2126 | if (options->num_user_hostfiles == 0) { | 2115 | if (options->num_user_hostfiles == 0) { |
2127 | options->user_hostfiles[options->num_user_hostfiles++] = | 2116 | options->user_hostfiles[options->num_user_hostfiles++] = |
2128 | xstrdup(_PATH_SSH_USER_HOSTFILE); | 2117 | xstrdup(_PATH_SSH_USER_HOSTFILE); |