From: Theodore Tso Date: Tue, 4 Oct 1994 03:21:18 +0000 (+0000) Subject: Database records now must be version 2.0 (instead of versions 1.0 or X-Git-Tag: krb5-1.0-beta4.3~24 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=18f215983b8f8fad8ccb9eb75ea06bd49bede2f3;p=krb5.git Database records now must be version 2.0 (instead of versions 1.0 or 0.0). The structure magic numbers force us to do an incompatible version number change. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4435 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/kdb/ChangeLog b/src/lib/kdb/ChangeLog index d45e028a6..570f2fd56 100644 --- a/src/lib/kdb/ChangeLog +++ b/src/lib/kdb/ChangeLog @@ -1,5 +1,13 @@ Mon Oct 3 22:47:49 1994 Theodore Y. Ts'o (tytso@dcl) + * kdb_dbm.c (decode_princ_contents): Force an incompatible version + number change to the database --- we are now at database + entry version 2.0. Unfortunately, the way we encode the + database is completely broken, and any structure changes + change the encoding format. We will need to redo this + completely at some point, so we don't have to make people + go through this again. + * Makefile.in: make install obey $(DESTDIR) Thu Aug 4 03:41:44 1994 Tom Yu (tlyu@dragons-lair) diff --git a/src/lib/kdb/kdb_dbm.c b/src/lib/kdb/kdb_dbm.c index 37d88b71d..2a00a1dff 100644 --- a/src/lib/kdb/kdb_dbm.c +++ b/src/lib/kdb/kdb_dbm.c @@ -524,7 +524,7 @@ krb5_db_entry *entry; return(ENOMEM); } nextloc = contents->dptr; - *nextloc++ = 1; /* Version number 1.0 */ + *nextloc++ = 2; /* Version number 2.0 */ *nextloc++ = 0; (void) memcpy(nextloc, (char *)©_princ, sizeof(copy_princ)); nextloc += sizeof(copy_princ); @@ -599,7 +599,7 @@ krb5_db_entry *entry; minor_version = *nextloc; nextloc++; sizeleft--; } - if (major_version < 0 || major_version > 1) + if (major_version != 2) return KRB5_KDB_BAD_VERSION; sizeleft -= sizeof(*entry);