diff options
author | 2001-02-08 22:35:30 +0000 | |
---|---|---|
committer | 2001-02-08 22:35:30 +0000 | |
commit | 136b929eef10cc2500a30e736ce3e683bb967063 (patch) | |
tree | 7c2a75a68e4f5520c1a8783bbb0692f6bad698d4 /usr.bin/ssh/sshconnect.c | |
parent | _PATH_LS; ok markus@ (diff) | |
download | wireguard-openbsd-136b929eef10cc2500a30e736ce3e683bb967063.tar.xz wireguard-openbsd-136b929eef10cc2500a30e736ce3e683bb967063.zip |
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.c | 6 |
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 |