diff options
author | djm@openbsd.org <djm@openbsd.org> | 2020-10-07 02:18:45 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2020-10-07 13:34:11 +1100 |
commit | e79957e877db42c4c68fabcf6ecff2268e53acb5 (patch) | |
tree | 9c14219f4a9fe59723950b1f248388132c675672 /readconf.c | |
parent | 3d4c2016bae1a6f14b48c1150a4c79ca4c9968bd (diff) |
upstream: disable UpdateHostkeys by default if VerifyHostKeyDNS is
enabled; suggested by Mark D. Baushke
OpenBSD-Commit-ID: 85a1b88592c81bc85df7ee7787dbbe721a0542bf
Diffstat (limited to 'readconf.c')
-rw-r--r-- | readconf.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -1,4 +1,4 @@ -/* $OpenBSD: readconf.c,v 1.337 2020/10/03 09:22:26 djm Exp $ */ +/* $OpenBSD: readconf.c,v 1.338 2020/10/07 02:18:45 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -2168,9 +2168,10 @@ fill_default_options(Options * options) xstrdup(_PATH_SSH_SYSTEM_HOSTFILE2); } if (options->update_hostkeys == -1) { - if (options->num_user_hostfiles == 0 || + if (options->verify_host_key_dns <= 0 && + (options->num_user_hostfiles == 0 || (options->num_user_hostfiles == 1 && strcmp(options-> - user_hostfiles[0], _PATH_SSH_USER_HOSTFILE) == 0)) + user_hostfiles[0], _PATH_SSH_USER_HOSTFILE) == 0))) options->update_hostkeys = SSH_UPDATE_HOSTKEYS_YES; else options->update_hostkeys = SSH_UPDATE_HOSTKEYS_NO; |