From 77efddaf157d82ddcede173da58d2bb489910e68 Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Mon, 18 Jun 2001 14:04:38 +0000 Subject: [PATCH] * accept_sec_context.c acquire_cred.c import_sec_context.c init_sec_context.c inq_cred.c: Cast const gss_OID to gss_OID for gssapi functions which are not speced with const in the RFC. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13360 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/gssapi/krb5/ChangeLog | 6 ++++++ src/lib/gssapi/krb5/accept_sec_context.c | 2 +- src/lib/gssapi/krb5/acquire_cred.c | 4 ++-- src/lib/gssapi/krb5/import_sec_context.c | 2 +- src/lib/gssapi/krb5/init_sec_context.c | 6 +++--- src/lib/gssapi/krb5/inq_cred.c | 4 ++-- 6 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/lib/gssapi/krb5/ChangeLog b/src/lib/gssapi/krb5/ChangeLog index 98e13a187..d6c39bb43 100644 --- a/src/lib/gssapi/krb5/ChangeLog +++ b/src/lib/gssapi/krb5/ChangeLog @@ -1,3 +1,9 @@ +2001-06-18 Ezra Peisach + + * accept_sec_context.c acquire_cred.c import_sec_context.c + init_sec_context.c inq_cred.c: Cast const gss_OID to gss_OID for + gssapi functions which are not speced with const in the RFC. + 2001-06-07 Ezra Peisach * ser_sctx.c (kg_oid_internalize): Do away with local variable diff --git a/src/lib/gssapi/krb5/accept_sec_context.c b/src/lib/gssapi/krb5/accept_sec_context.c index b01e49fd2..88fa7dbc8 100644 --- a/src/lib/gssapi/krb5/accept_sec_context.c +++ b/src/lib/gssapi/krb5/accept_sec_context.c @@ -526,7 +526,7 @@ krb5_gss_accept_sec_context(minor_status, context_handle, } memset(ctx, 0, sizeof(krb5_gss_ctx_id_rec)); - ctx->mech_used = mech_used; + ctx->mech_used = (gss_OID) mech_used; ctx->auth_context = auth_context; ctx->initiate = 0; ctx->gss_flags = KG_IMPLFLAGS(gss_flags); diff --git a/src/lib/gssapi/krb5/acquire_cred.c b/src/lib/gssapi/krb5/acquire_cred.c index 33946e767..91439f577 100644 --- a/src/lib/gssapi/krb5/acquire_cred.c +++ b/src/lib/gssapi/krb5/acquire_cred.c @@ -457,11 +457,11 @@ krb5_gss_acquire_cred(minor_status, desired_name, time_req, &ret_mechs)) || (cred->prerfc_mech && GSS_ERROR(ret = generic_gss_add_oid_set_member(minor_status, - gss_mech_krb5_old, + (gss_OID) gss_mech_krb5_old, &ret_mechs))) || (cred->rfc_mech && GSS_ERROR(ret = generic_gss_add_oid_set_member(minor_status, - gss_mech_krb5, + (gss_OID) gss_mech_krb5, &ret_mechs)))) { if (cred->ccache) (void)krb5_cc_close(context, cred->ccache); diff --git a/src/lib/gssapi/krb5/import_sec_context.c b/src/lib/gssapi/krb5/import_sec_context.c index fd5415a56..659cdc2b7 100644 --- a/src/lib/gssapi/krb5/import_sec_context.c +++ b/src/lib/gssapi/krb5/import_sec_context.c @@ -44,7 +44,7 @@ gss_OID krb5_gss_convert_static_mech_oid(oid) if ((oid->length == p->length) && (memcmp(oid->elements, p->elements, p->length) == 0)) { gss_release_oid(&minor_status, &oid); - return p; + return (gss_OID) p; } } return oid; diff --git a/src/lib/gssapi/krb5/init_sec_context.c b/src/lib/gssapi/krb5/init_sec_context.c index 9c9d3fca3..3fb392e77 100644 --- a/src/lib/gssapi/krb5/init_sec_context.c +++ b/src/lib/gssapi/krb5/init_sec_context.c @@ -403,9 +403,9 @@ krb5_gss_init_sec_context(minor_status, claimant_cred_handle, if (mech_type == GSS_C_NULL_OID) { default_mech = 1; if (cred->rfc_mech) { - mech_type = gss_mech_krb5; + mech_type = (gss_OID) gss_mech_krb5; } else if (cred->prerfc_mech) { - mech_type = gss_mech_krb5_old; + mech_type = (gss_OID) gss_mech_krb5_old; } else { err = 1; } @@ -494,7 +494,7 @@ krb5_gss_init_sec_context(minor_status, claimant_cred_handle, goto fail; if (default_mech) { - mech_type = gss_mech_krb5; + mech_type = (gss_OID) gss_mech_krb5; } if (generic_gss_copy_oid(minor_status, mech_type, &ctx->mech_used) diff --git a/src/lib/gssapi/krb5/inq_cred.c b/src/lib/gssapi/krb5/inq_cred.c index 6da0a5213..6fbbadcbe 100644 --- a/src/lib/gssapi/krb5/inq_cred.c +++ b/src/lib/gssapi/krb5/inq_cred.c @@ -140,11 +140,11 @@ krb5_gss_inquire_cred(minor_status, cred_handle, name, lifetime_ret, &mechs)) || (cred->prerfc_mech && GSS_ERROR(ret = generic_gss_add_oid_set_member(minor_status, - gss_mech_krb5_old, + (gss_OID) gss_mech_krb5_old, &mechs))) || (cred->rfc_mech && GSS_ERROR(ret = generic_gss_add_oid_set_member(minor_status, - gss_mech_krb5, + (gss_OID) gss_mech_krb5, &mechs)))) { krb5_free_principal(context, ret_name); /* *minor_status set above */ -- 2.26.2