From: Tom Yu Date: Thu, 25 May 2006 21:52:21 +0000 (+0000) Subject: * g_initialize.c (init_hardcoded): Env var option to disable the X-Git-Tag: ms-bug-test-20060525~1 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=334d3088d38487dc03752d9e2a9c507d20ccd342;p=krb5.git * g_initialize.c (init_hardcoded): Env var option to disable the MS "wrong" krb5 OID for testing. * spnego_mech.c (acc_ctx_call_acc): Env var option to force disabling of MIC checks when mutual auth not requested, for testing purposes. git-svn-id: svn://anonsvn.mit.edu/krb5/branches/mechglue@18040 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/gssapi/mechglue/ChangeLog b/src/lib/gssapi/mechglue/ChangeLog index 0097ef484..a316b0a2f 100644 --- a/src/lib/gssapi/mechglue/ChangeLog +++ b/src/lib/gssapi/mechglue/ChangeLog @@ -1,3 +1,8 @@ +2006-05-25 Tom Yu + + * g_initialize.c (init_hardcoded): Env var option to disable the + MS "wrong" krb5 OID for testing. + 2006-03-28 Tom Yu * g_initialize.c (build_mechSet): Actually return a value on success. diff --git a/src/lib/gssapi/mechglue/g_initialize.c b/src/lib/gssapi/mechglue/g_initialize.c index bb012f955..b8483f72e 100644 --- a/src/lib/gssapi/mechglue/g_initialize.c +++ b/src/lib/gssapi/mechglue/g_initialize.c @@ -559,6 +559,16 @@ init_hardcoded(void) g_mechListTail->next = cf; g_mechListTail = cf; +#ifdef MS_BUG_TEST + { + char *envstr = getenv("MS_FORCE_NO_MSOID"); + + if (envstr != NULL && strcmp(envstr, "1") == 0) { + inited = 1; + return; + } + } +#endif cf = malloc(sizeof(*cf)); if (cf == NULL) return; diff --git a/src/lib/gssapi/spnego/ChangeLog b/src/lib/gssapi/spnego/ChangeLog index 7fa3644c4..f9b7031f1 100644 --- a/src/lib/gssapi/spnego/ChangeLog +++ b/src/lib/gssapi/spnego/ChangeLog @@ -1,3 +1,9 @@ +2006-05-25 Tom Yu + + * spnego_mech.c (acc_ctx_call_acc): Env var option to force + disabling of MIC checks when mutual auth not requested, for + testing purposes. + 2006-05-25 Tom Yu * spnego_mech.c (acc_ctx_call_acc): Wrap call to diff --git a/src/lib/gssapi/spnego/spnego_mech.c b/src/lib/gssapi/spnego/spnego_mech.c index 109589163..93fe76444 100644 --- a/src/lib/gssapi/spnego/spnego_mech.c +++ b/src/lib/gssapi/spnego/spnego_mech.c @@ -1092,6 +1092,20 @@ acc_ctx_call_acc(OM_uint32 *minor_status, spnego_gss_ctx_id_t sc, time_rec, delegated_cred_handle); if (ret == GSS_S_COMPLETE) { +#ifdef MS_BUG_TEST + /* + * Force MIC to be not required even if we previously + * requested a MIC. + */ + char *envstr = getenv("MS_FORCE_NO_MIC"); + + if (envstr != NULL && strcmp(envstr, "1") == 0 && + !(sc->ctx_flags & GSS_C_MUTUAL_FLAG) && + sc->mic_reqd) { + + sc->mic_reqd = 0; + } +#endif sc->mech_complete = 1; if (ret_flags != NULL) *ret_flags = sc->ctx_flags;