From 9ab914a186111d0bba87e27a5745425abd423b95 Mon Sep 17 00:00:00 2001 From: Chris Provenzano Date: Wed, 13 Dec 1995 08:49:20 +0000 Subject: [PATCH] * dump.c, dumpv4.c, kdb5_edit.c, loadv4.c : Remove mkvno from krb5_db_entry. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7215 dc483132-0cff-0310-8789-dd5450dbe970 --- src/admin/edit/ChangeLog | 6 ++++++ src/admin/edit/dump.c | 16 ++++++---------- src/admin/edit/dumpv4.c | 2 +- src/admin/edit/kdb5_edit.c | 2 -- src/admin/edit/loadv4.c | 2 -- 5 files changed, 13 insertions(+), 15 deletions(-) diff --git a/src/admin/edit/ChangeLog b/src/admin/edit/ChangeLog index e92de018b..283637eef 100644 --- a/src/admin/edit/ChangeLog +++ b/src/admin/edit/ChangeLog @@ -1,3 +1,9 @@ + +Wed Dec 13 03:44:58 1995 Chris Provenzano (proven@mit.edu) + + * dump.c, dumpv4.c, kdb5_edit.c, loadv4.c : + Remove mkvno from krb5_db_entry. + Sun Dec 10 11:07:51 1995 Ezra Peisach * kdb5_edit.M: Document that modent exists diff --git a/src/admin/edit/dump.c b/src/admin/edit/dump.c index 1db27e1b7..94752c5eb 100644 --- a/src/admin/edit/dump.c +++ b/src/admin/edit/dump.c @@ -444,7 +444,7 @@ dump_k5beta_iterator(ptr, entry) "\t%u\t%u\t%u\t%u\t%u\t%u\t%u\t%u\t%u\t%u\t%s\t%u\t%u\t%u\t", (krb5_int32) pkey->key_data_kvno, entry->max_life, entry->max_renewable_life, - entry->mkvno, entry->expiration, entry->pw_expiration, + 1 /* Fake mkvno */, entry->expiration, entry->pw_expiration, last_pwd_change, entry->last_success, entry->last_failed, entry->fail_auth_count, mod_name, mod_date, entry->attributes, pkey->key_data_type[1]); @@ -533,7 +533,7 @@ dump_standard_iterator(ptr, entry) * The dump format is as follows: * len strlen(name) n_tl_data n_key_data e_length * name - * mkvno attributes max_life max_renewable_life expiration + * attributes max_life max_renewable_life expiration * pw_expiration last_success last_failed fail_auth_count * n_tl_data*[type length ] * n_key_data*[ver kvno ver*(type length )] @@ -558,8 +558,7 @@ dump_standard_iterator(ptr, entry) (int) entry->n_key_data, (int) entry->e_length, name); - fprintf(arg->ofile, "%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t", - entry->mkvno, + fprintf(arg->ofile, "%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t", entry->attributes, entry->max_life, entry->max_renewable_life, @@ -1017,7 +1016,6 @@ process_k5beta_record(fname, kcontext, filep, verbose, linenop) error++; } pkey->key_data_kvno = tmpint1; - dbent.mkvno = tmpint2; dbent.fail_auth_count = tmpint3; /* Read modifier name */ if (!error && read_string(filep, @@ -1247,10 +1245,9 @@ process_k5_record(fname, kcontext, filep, verbose, linenop) !(kret = krb5_parse_name(kcontext, name, &dbentry.princ))) { /* Get the fixed principal attributes */ - nread = fscanf(filep, "%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t", - &t1, &t2, &t3, &t4, &t5, &t6, &t7, &t8, &t9); + nread = fscanf(filep, "%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t", + &t2, &t3, &t4, &t5, &t6, &t7, &t8, &t9); if (nread == 9) { - dbentry.mkvno = (krb5_kvno) t1; dbentry.attributes = (krb5_flags) t2; dbentry.max_life = (krb5_deltat) t3; dbentry.max_renewable_life = (krb5_deltat) t4; @@ -1259,8 +1256,7 @@ process_k5_record(fname, kcontext, filep, verbose, linenop) dbentry.last_success = (krb5_timestamp) t7; dbentry.last_failed = (krb5_timestamp) t8; dbentry.fail_auth_count = (krb5_kvno) t9; - } - else { + } else { try2read = read_nint_data; error++; } diff --git a/src/admin/edit/dumpv4.c b/src/admin/edit/dumpv4.c index 84c501cc6..f26ef7b88 100644 --- a/src/admin/edit/dumpv4.c +++ b/src/admin/edit/dumpv4.c @@ -197,7 +197,7 @@ dump_v4_iterator(ptr, entry) found_one:; principal->key_version = max_kvno; principal->max_life = entry->max_life / (60 * 5); - principal->kdc_key_ver = entry->mkvno; /* ??? not preserved incoming */ + principal->kdc_key_ver = 1; /* ??? not preserved incoming */ principal->attributes = 0; /* ??? not preserved either */ fprintf(arg->f, "%s %s %d %d %d %d ", diff --git a/src/admin/edit/kdb5_edit.c b/src/admin/edit/kdb5_edit.c index f56af7e76..838d44f20 100644 --- a/src/admin/edit/kdb5_edit.c +++ b/src/admin/edit/kdb5_edit.c @@ -331,7 +331,6 @@ int create_db_entry(principal, newentry) memset(newentry, 0, sizeof(krb5_db_entry)); newentry->len = KRB5_KDB_V1_BASE_LENGTH; - newentry->mkvno = mblock.mkvno; newentry->attributes = mblock.flags; newentry->max_life = mblock.max_life; newentry->max_renewable_life = mblock.max_rlife; @@ -1098,7 +1097,6 @@ void show_principal(argc, argv) printf("Name: %s\n", pr_name); printf("Maximum life: %s\n", strdur(entry.max_life)); printf("Maximum renewable life: %s\n", strdur(entry.max_renewable_life)); - printf("Master key version: %d\n", entry.mkvno); (void) krb5_timestamp_to_string(entry.expiration, buffer, sizeof(buffer)); printf("Expiration: %s\n", buffer); (void) krb5_timestamp_to_string(entry.pw_expiration, diff --git a/src/admin/edit/loadv4.c b/src/admin/edit/loadv4.c index 1d9def177..78b77e06b 100644 --- a/src/admin/edit/loadv4.c +++ b/src/admin/edit/loadv4.c @@ -530,7 +530,6 @@ Principal *princ; entry.max_life = princ->max_life * 60 * 5; entry.max_renewable_life = rblock.max_rlife; - entry.mkvno = 1; entry.len = KRB5_KDB_V1_BASE_LENGTH; entry.expiration = princ->exp_date; entry.attributes = rblock.flags; /* XXX is there a way to convert @@ -610,7 +609,6 @@ struct realm_info *pblock; return(retval); entry.max_life = pblock->max_life; entry.max_renewable_life = pblock->max_rlife; - entry.mkvno = 1; entry.len = KRB5_KDB_V1_BASE_LENGTH; entry.expiration = pblock->expiration; if (retval = krb5_copy_principal(context, &db_create_princ, -- 2.26.2