upstream commit

make this compile with KERBEROS5 enabled
This commit is contained in:
djm@openbsd.org 2015-01-20 07:56:44 +00:00 committed by Damien Miller
parent e2cc6bef08
commit 12b5f50777

View File

@ -1,4 +1,4 @@
/* $OpenBSD: sshconnect2.c,v 1.219 2015/01/19 20:16:15 markus Exp $ */ /* $OpenBSD: sshconnect2.c,v 1.220 2015/01/20 07:56:44 djm Exp $ */
/* /*
* Copyright (c) 2000 Markus Friedl. All rights reserved. * Copyright (c) 2000 Markus Friedl. All rights reserved.
* Copyright (c) 2008 Damien Miller. All rights reserved. * Copyright (c) 2008 Damien Miller. All rights reserved.
@ -729,7 +729,7 @@ process_gssapi_token(void *ctxt, gss_buffer_t recv_tok)
} }
/* ARGSUSED */ /* ARGSUSED */
void int
input_gssapi_response(int type, u_int32_t plen, void *ctxt) input_gssapi_response(int type, u_int32_t plen, void *ctxt)
{ {
Authctxt *authctxt = ctxt; Authctxt *authctxt = ctxt;
@ -750,7 +750,7 @@ input_gssapi_response(int type, u_int32_t plen, void *ctxt)
free(oidv); free(oidv);
debug("Badly encoded mechanism OID received"); debug("Badly encoded mechanism OID received");
userauth(authctxt, NULL); userauth(authctxt, NULL);
return; return 0;
} }
if (!ssh_gssapi_check_oid(gssctxt, oidv + 2, oidlen - 2)) if (!ssh_gssapi_check_oid(gssctxt, oidv + 2, oidlen - 2))
@ -764,12 +764,13 @@ input_gssapi_response(int type, u_int32_t plen, void *ctxt)
/* Start again with next method on list */ /* Start again with next method on list */
debug("Trying to start again"); debug("Trying to start again");
userauth(authctxt, NULL); userauth(authctxt, NULL);
return; return 0;
} }
return 0;
} }
/* ARGSUSED */ /* ARGSUSED */
void int
input_gssapi_token(int type, u_int32_t plen, void *ctxt) input_gssapi_token(int type, u_int32_t plen, void *ctxt)
{ {
Authctxt *authctxt = ctxt; Authctxt *authctxt = ctxt;
@ -792,12 +793,13 @@ input_gssapi_token(int type, u_int32_t plen, void *ctxt)
if (GSS_ERROR(status)) { if (GSS_ERROR(status)) {
/* Start again with the next method in the list */ /* Start again with the next method in the list */
userauth(authctxt, NULL); userauth(authctxt, NULL);
return; return 0;
} }
return 0;
} }
/* ARGSUSED */ /* ARGSUSED */
void int
input_gssapi_errtok(int type, u_int32_t plen, void *ctxt) input_gssapi_errtok(int type, u_int32_t plen, void *ctxt)
{ {
Authctxt *authctxt = ctxt; Authctxt *authctxt = ctxt;
@ -824,10 +826,11 @@ input_gssapi_errtok(int type, u_int32_t plen, void *ctxt)
gss_release_buffer(&ms, &send_tok); gss_release_buffer(&ms, &send_tok);
/* Server will be returning a failed packet after this one */ /* Server will be returning a failed packet after this one */
return 0;
} }
/* ARGSUSED */ /* ARGSUSED */
void int
input_gssapi_error(int type, u_int32_t plen, void *ctxt) input_gssapi_error(int type, u_int32_t plen, void *ctxt)
{ {
char *msg; char *msg;
@ -843,6 +846,7 @@ input_gssapi_error(int type, u_int32_t plen, void *ctxt)
debug("Server GSSAPI Error:\n%s", msg); debug("Server GSSAPI Error:\n%s", msg);
free(msg); free(msg);
free(lang); free(lang);
return 0;
} }
#endif /* GSSAPI */ #endif /* GSSAPI */