From: Theodore Tso Date: Sat, 25 Mar 1995 03:08:05 +0000 (+0000) Subject: Hardcode the size of the keytype field in the file format, to be X-Git-Tag: krb5-1.0-beta5~469 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=381a587ba0ffa71347604089a1fed846c49c4611;p=krb5.git Hardcode the size of the keytype field in the file format, to be compatible with what was used in the Beta 4 release (before we changed the size of a krb5_keytype type). git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5241 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/kdb/ChangeLog b/src/lib/kdb/ChangeLog index fe5739121..e3d7bf4b3 100644 --- a/src/lib/kdb/ChangeLog +++ b/src/lib/kdb/ChangeLog @@ -1,3 +1,11 @@ +Fri Mar 24 21:59:34 1995 Theodore Y. Ts'o + + * store_mkey.c (krb5_db_store_mkey): + * fetch_mkey.c (krb5_db_fetch_mkey): Hardcode the size of the + keytype field in the file format, to be compatible with + what was used in the Beta 4 release (before we changed the + size of a krb5_keytype type). + Fri Mar 24 15:13:53 1995 * kdb_dbm.c: Don't cast dbm_close() to void, because dbm_close is diff --git a/src/lib/kdb/fetch_mkey.c b/src/lib/kdb/fetch_mkey.c index 37ae53a5a..c8feb08a2 100644 --- a/src/lib/kdb/fetch_mkey.c +++ b/src/lib/kdb/fetch_mkey.c @@ -113,7 +113,7 @@ krb5_db_fetch_mkey(context, mname, eblock, fromkeyboard, twice, salt, key) if (!(kf = fopen(defkeyfile, "r"))) #endif return KRB5_KDB_CANTREAD_STORED; - if (fread((krb5_pointer) &keytype, sizeof(keytype), 1, kf) != 1) { + if (fread((krb5_pointer) &keytype, 1, 1, kf) != 1) { retval = KRB5_KDB_CANTREAD_STORED; goto errout; } diff --git a/src/lib/kdb/store_mkey.c b/src/lib/kdb/store_mkey.c index 25dc5c3ec..377ebba9f 100644 --- a/src/lib/kdb/store_mkey.c +++ b/src/lib/kdb/store_mkey.c @@ -84,7 +84,7 @@ krb5_db_store_mkey(context, keyfile, mname, key) return errno; } if ((fwrite((krb5_pointer) &key->keytype, - sizeof(key->keytype), 1, kf) != 1) || + 1, 1, kf) != 1) || (fwrite((krb5_pointer) &key->length, sizeof(key->length), 1, kf) != 1) || (fwrite((krb5_pointer) key->contents,