From 18f215983b8f8fad8ccb9eb75ea06bd49bede2f3 Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Tue, 4 Oct 1994 03:21:18 +0000 Subject: [PATCH] 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 --- src/lib/kdb/ChangeLog | 8 ++++++++ src/lib/kdb/kdb_dbm.c | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) 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); -- 2.26.2