diff options
author | markus@openbsd.org <markus@openbsd.org> | 2015-01-19 20:07:45 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2015-01-20 09:14:16 +1100 |
commit | 3fdc88a0def4f86aa88a5846ac079dc964c0546a (patch) | |
tree | d26470c8ffb49bb4417af2b729d933d6ce3f75f8 /auth2.c | |
parent | 091c302829210c41e7f57c3f094c7b9c054306f0 (diff) |
upstream commit
move dispatch to struct ssh; ok djm@
Diffstat (limited to 'auth2.c')
-rw-r--r-- | auth2.c | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: auth2.c,v 1.134 2014/12/22 07:55:51 djm Exp $ */ | 1 | /* $OpenBSD: auth2.c,v 1.135 2015/01/19 20:07:45 markus Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2000 Markus Friedl. All rights reserved. | 3 | * Copyright (c) 2000 Markus Friedl. All rights reserved. |
4 | * | 4 | * |
@@ -87,8 +87,8 @@ Authmethod *authmethods[] = { | |||
87 | 87 | ||
88 | /* protocol */ | 88 | /* protocol */ |
89 | 89 | ||
90 | static void input_service_request(int, u_int32_t, void *); | 90 | static int input_service_request(int, u_int32_t, void *); |
91 | static void input_userauth_request(int, u_int32_t, void *); | 91 | static int input_userauth_request(int, u_int32_t, void *); |
92 | 92 | ||
93 | /* helper */ | 93 | /* helper */ |
94 | static Authmethod *authmethod_lookup(Authctxt *, const char *); | 94 | static Authmethod *authmethod_lookup(Authctxt *, const char *); |
@@ -174,7 +174,7 @@ do_authentication2(Authctxt *authctxt) | |||
174 | } | 174 | } |
175 | 175 | ||
176 | /*ARGSUSED*/ | 176 | /*ARGSUSED*/ |
177 | static void | 177 | static int |
178 | input_service_request(int type, u_int32_t seq, void *ctxt) | 178 | input_service_request(int type, u_int32_t seq, void *ctxt) |
179 | { | 179 | { |
180 | Authctxt *authctxt = ctxt; | 180 | Authctxt *authctxt = ctxt; |
@@ -205,10 +205,11 @@ input_service_request(int type, u_int32_t seq, void *ctxt) | |||
205 | packet_disconnect("bad service request %s", service); | 205 | packet_disconnect("bad service request %s", service); |
206 | } | 206 | } |
207 | free(service); | 207 | free(service); |
208 | return 0; | ||
208 | } | 209 | } |
209 | 210 | ||
210 | /*ARGSUSED*/ | 211 | /*ARGSUSED*/ |
211 | static void | 212 | static int |
212 | input_userauth_request(int type, u_int32_t seq, void *ctxt) | 213 | input_userauth_request(int type, u_int32_t seq, void *ctxt) |
213 | { | 214 | { |
214 | Authctxt *authctxt = ctxt; | 215 | Authctxt *authctxt = ctxt; |
@@ -284,6 +285,7 @@ input_userauth_request(int type, u_int32_t seq, void *ctxt) | |||
284 | free(service); | 285 | free(service); |
285 | free(user); | 286 | free(user); |
286 | free(method); | 287 | free(method); |
288 | return 0; | ||
287 | } | 289 | } |
288 | 290 | ||
289 | void | 291 | void |