X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/blobdiff_plain/bc240b210b3bbd3792230e9605414564b0b8e5aa..1cc8558b672e679ff45e95a6a21101a43bcfc3dc:/ssh.c diff --git a/ssh.c b/ssh.c index f6828ddf..8dc03960 100644 --- a/ssh.c +++ b/ssh.c @@ -2459,7 +2459,7 @@ static void ssh1_protocol(unsigned char *in, int inlen, int ispkt) pf->dport = dport; if (add234(ssh_rportfwds, pf) != pf) { sprintf(buf, - "Duplicate remote port forwarding to %s:%s", + "Duplicate remote port forwarding to %s:%d", host, dport); logevent(buf); sfree(pf); @@ -2615,7 +2615,7 @@ static void ssh1_protocol(unsigned char *in, int inlen, int ispkt) for(h = host, p = pktin.body+8; hostsize != 0; hostsize--) { if (h+1 < host+sizeof(host)) *h++ = *p; - *p++; + p++; } *h = 0; port = GET_32BIT(p); @@ -3318,7 +3318,8 @@ static void do_ssh2_authconn(unsigned char *in, int inlen, int ispkt) AUTH_TYPE_PUBLICKEY_OFFER_LOUD, AUTH_TYPE_PUBLICKEY_OFFER_QUIET, AUTH_TYPE_PASSWORD, - AUTH_TYPE_KEYBOARD_INTERACTIVE + AUTH_TYPE_KEYBOARD_INTERACTIVE, + AUTH_TYPE_KEYBOARD_INTERACTIVE_QUIET } type; static int gotit, need_pw, can_pubkey, can_passwd, can_keyb_inter; static int tried_pubkey_config, tried_agent, tried_keyb_inter; @@ -3534,6 +3535,8 @@ static void do_ssh2_authconn(unsigned char *in, int inlen, int ispkt) if (type == AUTH_TYPE_PUBLICKEY_OFFER_LOUD) c_write_str("Server refused our key\r\n"); logevent("Server refused public key"); + } else if (type == AUTH_TYPE_KEYBOARD_INTERACTIVE_QUIET) { + /* server declined keyboard-interactive; ignore */ } else { c_write_str("Access denied\r\n"); logevent("Access denied"); @@ -3577,7 +3580,7 @@ static void do_ssh2_authconn(unsigned char *in, int inlen, int ispkt) if (pktin.type == SSH2_MSG_USERAUTH_FAILURE) gotit = TRUE; logevent("Keyboard-interactive authentication refused"); - type = AUTH_TYPE_KEYBOARD_INTERACTIVE; + type = AUTH_TYPE_KEYBOARD_INTERACTIVE_QUIET; continue; } @@ -4140,7 +4143,7 @@ static void do_ssh2_authconn(unsigned char *in, int inlen, int ispkt) pf->sport = sport; if (add234(ssh_rportfwds, pf) != pf) { sprintf(buf, - "Duplicate remote port forwarding to %s:%s", + "Duplicate remote port forwarding to %s:%d", host, dport); logevent(buf); sfree(pf);