* g_initialize.c (init_hardcoded): Env var option to disable the
authorTom Yu <tlyu@mit.edu>
Thu, 25 May 2006 21:52:21 +0000 (21:52 +0000)
committerTom Yu <tlyu@mit.edu>
Thu, 25 May 2006 21:52:21 +0000 (21:52 +0000)
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

src/lib/gssapi/mechglue/ChangeLog
src/lib/gssapi/mechglue/g_initialize.c
src/lib/gssapi/spnego/ChangeLog
src/lib/gssapi/spnego/spnego_mech.c

index 0097ef484cffa8d68c85069810a36798c5464c72..a316b0a2f7df7d6ce51b82b543c9bf5d96370df7 100644 (file)
@@ -1,3 +1,8 @@
+2006-05-25  Tom Yu  <tlyu@mit.edu>
+
+       * g_initialize.c (init_hardcoded): Env var option to disable the
+       MS "wrong" krb5 OID for testing.
+
 2006-03-28  Tom Yu  <tlyu@mit.edu>
 
        * g_initialize.c (build_mechSet): Actually return a value on success.
index bb012f955c1282c03ff97bb40606403a350199c8..b8483f72e4f6f509a37ad62b0469ca26e8de915e 100644 (file)
@@ -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;
index 7fa3644c4c166a583e4c6216030316c00dbb9604..f9b7031f19b52b958e1a509586c2bd9c7649a868 100644 (file)
@@ -1,3 +1,9 @@
+2006-05-25  Tom Yu  <tlyu@mit.edu>
+
+       * 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  <tlyu@mit.edu>
 
        * spnego_mech.c (acc_ctx_call_acc): Wrap call to
index 109589163b0960bb5d2154748a69eb9a11c4a10e..93fe76444fdae23d7120c9cc946cbc85ac38ec17 100644 (file)
@@ -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;