summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2015-01-20 07:56:44 +0000
committerDamien Miller <djm@mindrot.org>2015-01-20 18:58:37 +1100
commit12b5f50777203e12575f1b08568281e447249ed3 (patch)
tree09ab84e31a8e01275f120328d36ab9552c96fb7d
parente2cc6bef08941256817d44d146115b3478586ad4 (diff)
upstream commit
make this compile with KERBEROS5 enabled
-rw-r--r--sshconnect2.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/sshconnect2.c b/sshconnect2.c
index e5802abcc..03238ffdc 100644
--- a/sshconnect2.c
+++ b/sshconnect2.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshconnect2.c,v 1.219 2015/01/19 20:16:15 markus Exp $ */ 1/* $OpenBSD: sshconnect2.c,v 1.220 2015/01/20 07:56:44 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
4 * Copyright (c) 2008 Damien Miller. All rights reserved. 4 * Copyright (c) 2008 Damien Miller. All rights reserved.
@@ -729,7 +729,7 @@ process_gssapi_token(void *ctxt, gss_buffer_t recv_tok)
729} 729}
730 730
731/* ARGSUSED */ 731/* ARGSUSED */
732void 732int
733input_gssapi_response(int type, u_int32_t plen, void *ctxt) 733input_gssapi_response(int type, u_int32_t plen, void *ctxt)
734{ 734{
735 Authctxt *authctxt = ctxt; 735 Authctxt *authctxt = ctxt;
@@ -750,7 +750,7 @@ input_gssapi_response(int type, u_int32_t plen, void *ctxt)
750 free(oidv); 750 free(oidv);
751 debug("Badly encoded mechanism OID received"); 751 debug("Badly encoded mechanism OID received");
752 userauth(authctxt, NULL); 752 userauth(authctxt, NULL);
753 return; 753 return 0;
754 } 754 }
755 755
756 if (!ssh_gssapi_check_oid(gssctxt, oidv + 2, oidlen - 2)) 756 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)
764 /* Start again with next method on list */ 764 /* Start again with next method on list */
765 debug("Trying to start again"); 765 debug("Trying to start again");
766 userauth(authctxt, NULL); 766 userauth(authctxt, NULL);
767 return; 767 return 0;
768 } 768 }
769 return 0;
769} 770}
770 771
771/* ARGSUSED */ 772/* ARGSUSED */
772void 773int
773input_gssapi_token(int type, u_int32_t plen, void *ctxt) 774input_gssapi_token(int type, u_int32_t plen, void *ctxt)
774{ 775{
775 Authctxt *authctxt = ctxt; 776 Authctxt *authctxt = ctxt;
@@ -792,12 +793,13 @@ input_gssapi_token(int type, u_int32_t plen, void *ctxt)
792 if (GSS_ERROR(status)) { 793 if (GSS_ERROR(status)) {
793 /* Start again with the next method in the list */ 794 /* Start again with the next method in the list */
794 userauth(authctxt, NULL); 795 userauth(authctxt, NULL);
795 return; 796 return 0;
796 } 797 }
798 return 0;
797} 799}
798 800
799/* ARGSUSED */ 801/* ARGSUSED */
800void 802int
801input_gssapi_errtok(int type, u_int32_t plen, void *ctxt) 803input_gssapi_errtok(int type, u_int32_t plen, void *ctxt)
802{ 804{
803 Authctxt *authctxt = ctxt; 805 Authctxt *authctxt = ctxt;
@@ -824,10 +826,11 @@ input_gssapi_errtok(int type, u_int32_t plen, void *ctxt)
824 gss_release_buffer(&ms, &send_tok); 826 gss_release_buffer(&ms, &send_tok);
825 827
826 /* Server will be returning a failed packet after this one */ 828 /* Server will be returning a failed packet after this one */
829 return 0;
827} 830}
828 831
829/* ARGSUSED */ 832/* ARGSUSED */
830void 833int
831input_gssapi_error(int type, u_int32_t plen, void *ctxt) 834input_gssapi_error(int type, u_int32_t plen, void *ctxt)
832{ 835{
833 char *msg; 836 char *msg;
@@ -843,6 +846,7 @@ input_gssapi_error(int type, u_int32_t plen, void *ctxt)
843 debug("Server GSSAPI Error:\n%s", msg); 846 debug("Server GSSAPI Error:\n%s", msg);
844 free(msg); 847 free(msg);
845 free(lang); 848 free(lang);
849 return 0;
846} 850}
847#endif /* GSSAPI */ 851#endif /* GSSAPI */
848 852