diff options
author | 2020-12-20 23:38:00 +0000 | |
---|---|---|
committer | 2020-12-20 23:38:00 +0000 | |
commit | 352e345034e1a43e36b098397b5f3bcd1f86cda1 (patch) | |
tree | 62aa86da8615e200563efab82d68ddb44e35f87f /usr.bin/ssh/sshconnect.c | |
parent | load_hostkeys()/hostkeys_foreach() variants for FILE* (diff) | |
download | wireguard-openbsd-352e345034e1a43e36b098397b5f3bcd1f86cda1.tar.xz wireguard-openbsd-352e345034e1a43e36b098397b5f3bcd1f86cda1.zip |
allow UserKnownHostsFile=none; feedback and ok markus@
Diffstat (limited to 'usr.bin/ssh/sshconnect.c')
-rw-r--r-- | usr.bin/ssh/sshconnect.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/ssh/sshconnect.c b/usr.bin/ssh/sshconnect.c index c757d9cd154..424f148d619 100644 --- a/usr.bin/ssh/sshconnect.c +++ b/usr.bin/ssh/sshconnect.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect.c,v 1.346 2020/12/20 23:36:51 djm Exp $ */ +/* $OpenBSD: sshconnect.c,v 1.347 2020/12/20 23:38:00 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -911,6 +911,10 @@ check_host_key(char *hostname, struct sockaddr *hostaddr, u_short port, host_status = check_key_in_hostkeys(host_hostkeys, host_key, &host_found); + /* If no host files were specified, then don't try to touch them */ + if (!readonly && num_user_hostfiles == 0) + readonly = RDONLY; + /* * Also perform check for the ip address, skip the check if we are * localhost, looking for a certificate, or the hostname was an ip |