summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/sshconnect.c
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2001-02-08 22:35:31 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2001-02-08 22:35:31 +0000
commit71ef7b27e333e7fd7519151789a49779a6fb33f8 (patch)
tree5a0925d8251647b43f342c2a99aacc0ece980612 /usr.bin/ssh/sshconnect.c
parent42d22c84049840d34c843cd1d9b1002e64a53afe (diff)
don't connect if batch_mode is true and stricthostkeychecking set to 'ask'
Diffstat (limited to 'usr.bin/ssh/sshconnect.c')
-rw-r--r--usr.bin/ssh/sshconnect.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/ssh/sshconnect.c b/usr.bin/ssh/sshconnect.c
index 8f18e7ec9b6..ff21ba3346c 100644
--- a/usr.bin/ssh/sshconnect.c
+++ b/usr.bin/ssh/sshconnect.c
@@ -13,7 +13,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: sshconnect.c,v 1.95 2001/02/08 19:30:52 itojun Exp $");
+RCSID("$OpenBSD: sshconnect.c,v 1.96 2001/02/08 22:35:30 markus Exp $");
#include <openssl/bn.h>
@@ -417,6 +417,7 @@ ssh_exchange_identification(void)
debug("Local version string %.100s", client_version_string);
}
+/* defaults to 'no' */
int
read_yes_or_no(const char *prompt, int defval)
{
@@ -424,6 +425,9 @@ read_yes_or_no(const char *prompt, int defval)
FILE *f;
int retval = -1;
+ if (options.batch_mode)
+ return 0;
+
if (isatty(STDIN_FILENO))
f = stdin;
else