summaryrefslogtreecommitdiffstats
path: root/auth2.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2002-01-22 13:24:13 +0100
committerDamien Miller <djm@mindrot.org>2002-01-22 13:24:13 +0100
commit7d05339c709efbf699e0dae499308428174a0da4 (patch)
tree22bbfa5480faa991511831b4c8aa5846267a27f4 /auth2.c
parent - markus@cvs.openbsd.org 2002/01/11 13:36:43 (diff)
downloadopenssh-7d05339c709efbf699e0dae499308428174a0da4.tar.xz
openssh-7d05339c709efbf699e0dae499308428174a0da4.zip
- markus@cvs.openbsd.org 2002/01/11 13:39:36
[auth2.c dispatch.c dispatch.h kex.c] a single dispatch_protocol_error() that sends a message of type 'UNIMPLEMENTED' dispatch_range(): set handler for a ranges message types use dispatch_protocol_ignore() for authentication requests after successful authentication (the drafts requirement). serverloop/clientloop now send a 'UNIMPLEMENTED' message instead of exiting.
Diffstat (limited to 'auth2.c')
-rw-r--r--auth2.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/auth2.c b/auth2.c
index e48bed7c1..dc35a55f4 100644
--- a/auth2.c
+++ b/auth2.c
@@ -23,7 +23,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: auth2.c,v 1.80 2001/12/28 15:06:00 markus Exp $");
+RCSID("$OpenBSD: auth2.c,v 1.81 2002/01/11 13:39:36 markus Exp $");
#include <openssl/evp.h>
@@ -71,7 +71,6 @@ struct Authmethod {
static void input_service_request(int, u_int32_t, void *);
static void input_userauth_request(int, u_int32_t, void *);
-static void protocol_error(int, u_int32_t, void *);
/* helper */
static Authmethod *authmethod_lookup(const char *);
@@ -123,23 +122,13 @@ do_authentication2(void)
if (options.pam_authentication_via_kbd_int)
options.kbd_interactive_authentication = 1;
- dispatch_init(&protocol_error);
+ dispatch_init(&dispatch_protocol_error);
dispatch_set(SSH2_MSG_SERVICE_REQUEST, &input_service_request);
dispatch_run(DISPATCH_BLOCK, &authctxt->success, authctxt);
do_authenticated(authctxt);
}
static void
-protocol_error(int type, u_int32_t seq, void *ctxt)
-{
- log("auth: protocol error: type %d", type);
- packet_start(SSH2_MSG_UNIMPLEMENTED);
- packet_put_int(seq);
- packet_send();
- packet_write_wait();
-}
-
-static void
input_service_request(int type, u_int32_t seq, void *ctxt)
{
Authctxt *authctxt = ctxt;
@@ -265,7 +254,7 @@ userauth_finish(Authctxt *authctxt, int authenticated, char *method)
/* XXX todo: check if multiple auth methods are needed */
if (authenticated == 1) {
/* turn off userauth */
- dispatch_set(SSH2_MSG_USERAUTH_REQUEST, &protocol_error);
+ dispatch_set(SSH2_MSG_USERAUTH_REQUEST, &dispatch_protocol_ignore);
packet_start(SSH2_MSG_USERAUTH_SUCCESS);
packet_send();
packet_write_wait();