[3798] in Kerberos

home help back first fref pref prev next nref lref last post

Bug in krb5kdc (V4 compatability)

daemon@ATHENA.MIT.EDU (grossa@SDSC.EDU)
Sun Sep 4 02:10:45 1994

Date: Sat, 3 Sep 94 23:00:17 PDT
From: grossa@SDSC.EDU
To: krb5-bugs@MIT.EDU
Cc: kerberos@MIT.EDU

Hello,

   I had the Kerberos V4 utilities (kinit, kadmin, etc.) working with
my Kerberos V5 beta4 patchlevel 0 server.  I then switched to Kerberos
V5 beta4 patchlevel 2, rebuilt the principal database, and the V4 stuff
stopped working.  The error I get is :

   "kinit: Principal: Incorrect master key version (kerberos)"


   The problem comes from two things.  First, kdb5_create was changed to
start the mkvno at 1 :

   kdb5_create:
   302c304
   <     entry.mkvno = 1;
   ---
   >     entry.mkvno = 0;

Second, the variable master_key_version in kdc/kerberos_v4.c is never
initialized.  master_key_version happened to default to 0 which made
things work while mkvno was also 0 .


   I made master_key_version an external in kdc/kerberos_v4.c, declared it
in kdc/main.c, and added the following to the end of init_db() :

      tgs_kvno = server.kvno;
+ #ifdef KRB4
+     master_key_version = server.mkvno;
+ #endif /*KRB4*/
      krb5_db_free_principal(&server, nprincs);
      return 0;


Andrew Gross

home help back first fref pref prev next nref lref last post