From ff4835eab2fbff24f4569df1b40e52f31ff6b347 Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Tue, 5 Jan 1999 05:15:28 +0000 Subject: [PATCH] * 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. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11100 dc483132-0cff-0310-8789-dd5450dbe970 --- src/kdc/ChangeLog | 8 ++++++++ src/kdc/configure.in | 6 ++++++ src/kdc/main.c | 19 ++++++++++++++++++- 3 files changed, 32 insertions(+), 1 deletion(-) diff --git a/src/kdc/ChangeLog b/src/kdc/ChangeLog index 52809a831..861585654 100644 --- a/src/kdc/ChangeLog +++ b/src/kdc/ChangeLog @@ -1,3 +1,11 @@ +Mon Jan 4 23:50:45 1999 Tom Yu + + * 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 * Makefile.in: Set the myfulldir and mydir variables (which are diff --git a/src/kdc/configure.in b/src/kdc/configure.in index 23a068d05..bf4d06edb 100644 --- a/src/kdc/configure.in +++ b/src/kdc/configure.in @@ -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 diff --git a/src/kdc/main.c b/src/kdc/main.c index a8f4233be..78b0a9949 100644 --- a/src/kdc/main.c +++ b/src/kdc/main.c @@ -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]); -- 2.26.2