summaryrefslogtreecommitdiff
path: root/sshconnect2.c
diff options
context:
space:
mode:
Diffstat (limited to 'sshconnect2.c')
-rw-r--r--sshconnect2.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/sshconnect2.c b/sshconnect2.c
index f38fdf9a0..6e61a353d 100644
--- a/sshconnect2.c
+++ b/sshconnect2.c
@@ -23,7 +23,7 @@
23 */ 23 */
24 24
25#include "includes.h" 25#include "includes.h"
26RCSID("$OpenBSD: sshconnect2.c,v 1.127 2003/10/11 08:26:43 markus Exp $"); 26RCSID("$OpenBSD: sshconnect2.c,v 1.128 2003/10/26 16:57:43 avsm Exp $");
27 27
28#include "openbsd-compat/sys-queue.h" 28#include "openbsd-compat/sys-queue.h"
29 29
@@ -480,7 +480,7 @@ int
480userauth_gssapi(Authctxt *authctxt) 480userauth_gssapi(Authctxt *authctxt)
481{ 481{
482 Gssctxt *gssctxt = NULL; 482 Gssctxt *gssctxt = NULL;
483 static gss_OID_set supported = NULL; 483 static gss_OID_set gss_supported = NULL;
484 static int mech = 0; 484 static int mech = 0;
485 OM_uint32 min; 485 OM_uint32 min;
486 int ok = 0; 486 int ok = 0;
@@ -488,18 +488,18 @@ userauth_gssapi(Authctxt *authctxt)
488 /* Try one GSSAPI method at a time, rather than sending them all at 488 /* Try one GSSAPI method at a time, rather than sending them all at
489 * once. */ 489 * once. */
490 490
491 if (supported == NULL) 491 if (gss_supported == NULL)
492 gss_indicate_mechs(&min, &supported); 492 gss_indicate_mechs(&min, &gss_supported);
493 493
494 /* Check to see if the mechanism is usable before we offer it */ 494 /* Check to see if the mechanism is usable before we offer it */
495 while (mech<supported->count && !ok) { 495 while (mech < gss_supported->count && !ok) {
496 if (gssctxt) 496 if (gssctxt)
497 ssh_gssapi_delete_ctx(&gssctxt); 497 ssh_gssapi_delete_ctx(&gssctxt);
498 ssh_gssapi_build_ctx(&gssctxt); 498 ssh_gssapi_build_ctx(&gssctxt);
499 ssh_gssapi_set_oid(gssctxt, &supported->elements[mech]); 499 ssh_gssapi_set_oid(gssctxt, &gss_supported->elements[mech]);
500 500
501 /* My DER encoding requires length<128 */ 501 /* My DER encoding requires length<128 */
502 if (supported->elements[mech].length < 128 && 502 if (gss_supported->elements[mech].length < 128 &&
503 !GSS_ERROR(ssh_gssapi_import_name(gssctxt, 503 !GSS_ERROR(ssh_gssapi_import_name(gssctxt,
504 authctxt->host))) { 504 authctxt->host))) {
505 ok = 1; /* Mechanism works */ 505 ok = 1; /* Mechanism works */
@@ -521,14 +521,14 @@ userauth_gssapi(Authctxt *authctxt)
521 521
522 /* Some servers encode the OID incorrectly (as we used to) */ 522 /* Some servers encode the OID incorrectly (as we used to) */
523 if (datafellows & SSH_BUG_GSSAPI_BER) { 523 if (datafellows & SSH_BUG_GSSAPI_BER) {
524 packet_put_string(supported->elements[mech].elements, 524 packet_put_string(gss_supported->elements[mech].elements,
525 supported->elements[mech].length); 525 gss_supported->elements[mech].length);
526 } else { 526 } else {
527 packet_put_int((supported->elements[mech].length)+2); 527 packet_put_int((gss_supported->elements[mech].length)+2);
528 packet_put_char(SSH_GSS_OIDTYPE); 528 packet_put_char(SSH_GSS_OIDTYPE);
529 packet_put_char(supported->elements[mech].length); 529 packet_put_char(gss_supported->elements[mech].length);
530 packet_put_raw(supported->elements[mech].elements, 530 packet_put_raw(gss_supported->elements[mech].elements,
531 supported->elements[mech].length); 531 gss_supported->elements[mech].length);
532 } 532 }
533 533
534 packet_send(); 534 packet_send();