diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2001-01-06 15:18:16 +0000 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2001-01-06 15:18:16 +0000 |
commit | d26dcf3371657e64dddc7c86c61a89666d4e7053 (patch) | |
tree | 34c3c8ce1bacad2b8a5d5999c0461bcba4abfa5c /sshconnect2.c | |
parent | 8835a8910513621a4c20a0ede9a4bdeee947cbd4 (diff) |
20010107
- (bal) OpenBSD Sync
- markus@cvs.openbsd.org 2001/01/06 11:23:27
[ssh-rsa.c]
remove unused
- itojun@cvs.openbsd.org 2001/01/05 08:23:29
[ssh-keyscan.1]
missing .El
- markus@cvs.openbsd.org 2001/01/04 22:41:03
[session.c sshconnect.c]
consistent use of _PATH_BSHELL; from stevesk@pobox.com
- djm@cvs.openbsd.org 2001/01/04 22:35:32
[ssh.1 sshd.8]
Mention AES as available SSH2 Cipher; ok markus
- markus@cvs.openbsd.org 2001/01/04 22:25:58
[sshd.c]
sync usage()/man with defaults; from stevesk@pobox.com
- markus@cvs.openbsd.org 2001/01/04 22:21:26
[sshconnect2.c]
handle SSH2_MSG_USERAUTH_BANNER; fixes bug when connecting to a server
that prints a banner (e.g. /etc/issue.net)
Diffstat (limited to 'sshconnect2.c')
-rw-r--r-- | sshconnect2.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/sshconnect2.c b/sshconnect2.c index 34d72818f..8321c9eb7 100644 --- a/sshconnect2.c +++ b/sshconnect2.c | |||
@@ -23,7 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include "includes.h" | 25 | #include "includes.h" |
26 | RCSID("$OpenBSD: sshconnect2.c,v 1.34 2000/12/27 12:34:50 markus Exp $"); | 26 | RCSID("$OpenBSD: sshconnect2.c,v 1.35 2001/01/04 22:21:26 markus Exp $"); |
27 | 27 | ||
28 | #include <openssl/bn.h> | 28 | #include <openssl/bn.h> |
29 | #include <openssl/rsa.h> | 29 | #include <openssl/rsa.h> |
@@ -467,6 +467,7 @@ struct Authmethod { | |||
467 | 467 | ||
468 | void input_userauth_success(int type, int plen, void *ctxt); | 468 | void input_userauth_success(int type, int plen, void *ctxt); |
469 | void input_userauth_failure(int type, int plen, void *ctxt); | 469 | void input_userauth_failure(int type, int plen, void *ctxt); |
470 | void input_userauth_banner(int type, int plen, void *ctxt); | ||
470 | void input_userauth_error(int type, int plen, void *ctxt); | 471 | void input_userauth_error(int type, int plen, void *ctxt); |
471 | void input_userauth_info_req(int type, int plen, void *ctxt); | 472 | void input_userauth_info_req(int type, int plen, void *ctxt); |
472 | 473 | ||
@@ -543,6 +544,7 @@ ssh_userauth2(const char *server_user, char *host) | |||
543 | dispatch_init(&input_userauth_error); | 544 | dispatch_init(&input_userauth_error); |
544 | dispatch_set(SSH2_MSG_USERAUTH_SUCCESS, &input_userauth_success); | 545 | dispatch_set(SSH2_MSG_USERAUTH_SUCCESS, &input_userauth_success); |
545 | dispatch_set(SSH2_MSG_USERAUTH_FAILURE, &input_userauth_failure); | 546 | dispatch_set(SSH2_MSG_USERAUTH_FAILURE, &input_userauth_failure); |
547 | dispatch_set(SSH2_MSG_USERAUTH_BANNER, &input_userauth_banner); | ||
546 | dispatch_run(DISPATCH_BLOCK, &authctxt.success, &authctxt); /* loop until success */ | 548 | dispatch_run(DISPATCH_BLOCK, &authctxt.success, &authctxt); /* loop until success */ |
547 | 549 | ||
548 | if (authctxt.agent != NULL) | 550 | if (authctxt.agent != NULL) |
@@ -553,7 +555,19 @@ ssh_userauth2(const char *server_user, char *host) | |||
553 | void | 555 | void |
554 | input_userauth_error(int type, int plen, void *ctxt) | 556 | input_userauth_error(int type, int plen, void *ctxt) |
555 | { | 557 | { |
556 | fatal("input_userauth_error: bad message during authentication"); | 558 | fatal("input_userauth_error: bad message during authentication: " |
559 | "type %d", type); | ||
560 | } | ||
561 | void | ||
562 | input_userauth_banner(int type, int plen, void *ctxt) | ||
563 | { | ||
564 | char *msg, *lang; | ||
565 | debug3("input_userauth_banner"); | ||
566 | msg = packet_get_string(NULL); | ||
567 | lang = packet_get_string(NULL); | ||
568 | fprintf(stderr, "%s", msg); | ||
569 | xfree(msg); | ||
570 | xfree(lang); | ||
557 | } | 571 | } |
558 | void | 572 | void |
559 | input_userauth_success(int type, int plen, void *ctxt) | 573 | input_userauth_success(int type, int plen, void *ctxt) |