diff options
Diffstat (limited to 'auth2-gss.c')
-rw-r--r-- | auth2-gss.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/auth2-gss.c b/auth2-gss.c index 447f896f2..1ca835773 100644 --- a/auth2-gss.c +++ b/auth2-gss.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: auth2-gss.c,v 1.21 2014/02/26 20:28:44 djm Exp $ */ | 1 | /* $OpenBSD: auth2-gss.c,v 1.22 2015/01/19 20:07:45 markus Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved. | 4 | * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved. |
@@ -48,10 +48,10 @@ | |||
48 | 48 | ||
49 | extern ServerOptions options; | 49 | extern ServerOptions options; |
50 | 50 | ||
51 | static void input_gssapi_token(int type, u_int32_t plen, void *ctxt); | 51 | static int input_gssapi_token(int type, u_int32_t plen, void *ctxt); |
52 | static void input_gssapi_mic(int type, u_int32_t plen, void *ctxt); | 52 | static int input_gssapi_mic(int type, u_int32_t plen, void *ctxt); |
53 | static void input_gssapi_exchange_complete(int type, u_int32_t plen, void *ctxt); | 53 | static int input_gssapi_exchange_complete(int type, u_int32_t plen, void *ctxt); |
54 | static void input_gssapi_errtok(int, u_int32_t, void *); | 54 | static int input_gssapi_errtok(int, u_int32_t, void *); |
55 | 55 | ||
56 | /* | 56 | /* |
57 | * We only support those mechanisms that we know about (ie ones that we know | 57 | * We only support those mechanisms that we know about (ie ones that we know |
@@ -126,7 +126,7 @@ userauth_gssapi(Authctxt *authctxt) | |||
126 | return (0); | 126 | return (0); |
127 | } | 127 | } |
128 | 128 | ||
129 | static void | 129 | static int |
130 | input_gssapi_token(int type, u_int32_t plen, void *ctxt) | 130 | input_gssapi_token(int type, u_int32_t plen, void *ctxt) |
131 | { | 131 | { |
132 | Authctxt *authctxt = ctxt; | 132 | Authctxt *authctxt = ctxt; |
@@ -178,9 +178,10 @@ input_gssapi_token(int type, u_int32_t plen, void *ctxt) | |||
178 | } | 178 | } |
179 | 179 | ||
180 | gss_release_buffer(&min_status, &send_tok); | 180 | gss_release_buffer(&min_status, &send_tok); |
181 | return 0; | ||
181 | } | 182 | } |
182 | 183 | ||
183 | static void | 184 | static int |
184 | input_gssapi_errtok(int type, u_int32_t plen, void *ctxt) | 185 | input_gssapi_errtok(int type, u_int32_t plen, void *ctxt) |
185 | { | 186 | { |
186 | Authctxt *authctxt = ctxt; | 187 | Authctxt *authctxt = ctxt; |
@@ -212,6 +213,7 @@ input_gssapi_errtok(int type, u_int32_t plen, void *ctxt) | |||
212 | /* The client will have already moved on to the next auth */ | 213 | /* The client will have already moved on to the next auth */ |
213 | 214 | ||
214 | gss_release_buffer(&maj_status, &send_tok); | 215 | gss_release_buffer(&maj_status, &send_tok); |
216 | return 0; | ||
215 | } | 217 | } |
216 | 218 | ||
217 | /* | 219 | /* |
@@ -220,7 +222,7 @@ input_gssapi_errtok(int type, u_int32_t plen, void *ctxt) | |||
220 | * which only enables it once the GSSAPI exchange is complete. | 222 | * which only enables it once the GSSAPI exchange is complete. |
221 | */ | 223 | */ |
222 | 224 | ||
223 | static void | 225 | static int |
224 | input_gssapi_exchange_complete(int type, u_int32_t plen, void *ctxt) | 226 | input_gssapi_exchange_complete(int type, u_int32_t plen, void *ctxt) |
225 | { | 227 | { |
226 | Authctxt *authctxt = ctxt; | 228 | Authctxt *authctxt = ctxt; |
@@ -244,9 +246,10 @@ input_gssapi_exchange_complete(int type, u_int32_t plen, void *ctxt) | |||
244 | dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_MIC, NULL); | 246 | dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_MIC, NULL); |
245 | dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_EXCHANGE_COMPLETE, NULL); | 247 | dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_EXCHANGE_COMPLETE, NULL); |
246 | userauth_finish(authctxt, authenticated, "gssapi-with-mic", NULL); | 248 | userauth_finish(authctxt, authenticated, "gssapi-with-mic", NULL); |
249 | return 0; | ||
247 | } | 250 | } |
248 | 251 | ||
249 | static void | 252 | static int |
250 | input_gssapi_mic(int type, u_int32_t plen, void *ctxt) | 253 | input_gssapi_mic(int type, u_int32_t plen, void *ctxt) |
251 | { | 254 | { |
252 | Authctxt *authctxt = ctxt; | 255 | Authctxt *authctxt = ctxt; |
@@ -284,6 +287,7 @@ input_gssapi_mic(int type, u_int32_t plen, void *ctxt) | |||
284 | dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_MIC, NULL); | 287 | dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_MIC, NULL); |
285 | dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_EXCHANGE_COMPLETE, NULL); | 288 | dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_EXCHANGE_COMPLETE, NULL); |
286 | userauth_finish(authctxt, authenticated, "gssapi-with-mic", NULL); | 289 | userauth_finish(authctxt, authenticated, "gssapi-with-mic", NULL); |
290 | return 0; | ||
287 | } | 291 | } |
288 | 292 | ||
289 | Authmethod method_gssapi = { | 293 | Authmethod method_gssapi = { |