summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2003-11-03 20:06:14 +1100
committerDarren Tucker <dtucker@zip.com.au>2003-11-03 20:06:14 +1100
commit56afe145e0c77f3447cf2098a4601289bd1c7ef1 (patch)
tree57dd4341349338161ad5a10106240ba2f41b6bd6
parent8cc39788cbe1d9caaf78ebb4c0a29ad6a61a9876 (diff)
- avsm@cvs.openbsd.org 2003/10/26 16:57:43
[sshconnect2.c] rename 'supported' static var in userauth_gssapi() to 'gss_supported' to avoid shadowing the global version. markus@ ok
-rw-r--r--ChangeLog6
-rw-r--r--sshconnect2.c26
2 files changed, 18 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index 5352c90d3..a4b846d8b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,10 @@
9 - markus@cvs.openbsd.org 2003/10/21 09:50:06 9 - markus@cvs.openbsd.org 2003/10/21 09:50:06
10 [auth2-gss.c] 10 [auth2-gss.c]
11 make sure the doid is larger than 2 11 make sure the doid is larger than 2
12 - avsm@cvs.openbsd.org 2003/10/26 16:57:43
13 [sshconnect2.c]
14 rename 'supported' static var in userauth_gssapi() to 'gss_supported'
15 to avoid shadowing the global version. markus@ ok
12 16
1320031021 1720031021
14 - (dtucker) [INSTALL] Some system crypt() functions support MD5 passwords 18 - (dtucker) [INSTALL] Some system crypt() functions support MD5 passwords
@@ -1383,4 +1387,4 @@
1383 - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. 1387 - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
1384 Report from murple@murple.net, diagnosis from dtucker@zip.com.au 1388 Report from murple@murple.net, diagnosis from dtucker@zip.com.au
1385 1389
1386$Id: ChangeLog,v 1.3088 2003/11/03 09:05:03 dtucker Exp $ 1390$Id: ChangeLog,v 1.3089 2003/11/03 09:06:14 dtucker Exp $
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();