* configure.in (withval): Conditinalize ATHENA_DES3_KLUDGE on
authorTom Yu <tlyu@mit.edu>
Tue, 5 Jan 1999 05:15:28 +0000 (05:15 +0000)
committerTom Yu <tlyu@mit.edu>
Tue, 5 Jan 1999 05:15:28 +0000 (05:15 +0000)
--enable-athena.

* main.c (initialize_realms): Kludge to disable
des3-marc-hmac-sha1 from the command line.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11100 dc483132-0cff-0310-8789-dd5450dbe970

src/kdc/ChangeLog
src/kdc/configure.in
src/kdc/main.c

index 52809a831232275399f4ed304750687b0093ceb0..861585654f98677ef9cf4018fa9aeb79a96cdc7e 100644 (file)
@@ -1,3 +1,11 @@
+Mon Jan  4 23:50:45 1999  Tom Yu  <tlyu@mit.edu>
+
+       * configure.in (withval): Conditinalize ATHENA_DES3_KLUDGE on
+       --enable-athena.
+
+       * main.c (initialize_realms): Kludge to disable
+       des3-marc-hmac-sha1 from the command line.
+
 1998-11-13  Theodore Ts'o  <tytso@rsts-11.mit.edu>
 
        * Makefile.in: Set the myfulldir and mydir variables (which are
index 23a068d054ac3ba94f842df1d266ea57b64a4e37..bf4d06edb7afd3b94e8e84f32f0e707c98d039a7 100644 (file)
@@ -32,6 +32,12 @@ if test "$withval" = yes; then
        AC_MSG_RESULT(Updating KDC database with each request)
        AC_DEFINE(KRBCONF_KDC_MODIFIES_KDB)
 fi
+dnl XXX This will go away soon. -- tlyu
+AC_ARG_ENABLE([athena],
+[  --enable-athena         build with MIT Project Athena configuration
+                           -- here meaning use temporary DES3 etype that
+                              includes 32-bit length codings],
+[AC_DEFINE(ATHENA_DES3_KLUDGE)],)
 dnl
 dnl
 KRB5_RUN_FLAGS
index a8f4233beb6206d40f77483c8aa313d8689cfdad..78b0a9949025960f3db6d6dc7b4bc33d58636a96 100644 (file)
@@ -609,6 +609,10 @@ initialize_realms(kcontext, argc, argv)
     char                *v4mode = 0;
 #endif
     extern char *optarg;
+#ifdef ATHENA_DES3_KLUDGE
+    extern struct krb5_keytypes krb5_enctypes_list[];
+    extern int krb5_enctypes_length;
+#endif
 
     if (!krb5_aprof_init(DEFAULT_KDC_PROFILE, KDC_PROFILE_ENV, &aprof)) {
        hierarchy[0] = "kdcdefaults";
@@ -631,7 +635,7 @@ initialize_realms(kcontext, argc, argv)
      * Loop through the option list.  Each time we encounter a realm name,
      * use the previously scanned options to fill in for defaults.
      */
-    while ((c = getopt(argc, argv, "r:d:mM:k:R:e:p:s:n4:")) != -1) {
+    while ((c = getopt(argc, argv, "r:d:mM:k:R:e:p:s:n4:3")) != -1) {
        switch(c) {
        case 'r':                       /* realm name for db */
            if (!find_realm_data(optarg, (krb5_ui_4) strlen(optarg))) {
@@ -681,6 +685,19 @@ initialize_realms(kcontext, argc, argv)
            v4mode = strdup(optarg);
 #endif
            break;
+       case '3':
+#ifdef ATHENA_DES3_KLUDGE
+           if (krb5_enctypes_list[krb5_enctypes_length-1].etype
+               != ENCTYPE_LOCAL_DES3_HMAC_SHA1) {
+               fprintf(stderr,
+                       "internal inconsistency in enctypes_list"
+                       " while disabling\n"
+                       "des3-marc-hmac-sha1 enctype\n");
+               exit(1);
+           }
+           krb5_enctypes_length--;
+           break;
+#endif
        case '?':
        default:
            usage(argv[0]);