Hardcode the size of the keytype field in the file format, to be
authorTheodore Tso <tytso@mit.edu>
Sat, 25 Mar 1995 03:08:05 +0000 (03:08 +0000)
committerTheodore Tso <tytso@mit.edu>
Sat, 25 Mar 1995 03:08:05 +0000 (03:08 +0000)
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

src/lib/kdb/ChangeLog
src/lib/kdb/fetch_mkey.c
src/lib/kdb/store_mkey.c

index fe5739121dbbe50640cdac8e589c1dadc367507e..e3d7bf4b3ff2e0bac29cf6ac16945943babfdfa7 100644 (file)
@@ -1,3 +1,11 @@
+Fri Mar 24 21:59:34 1995  Theodore Y. Ts'o  <tytso@dcl>
+
+       * 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    <tytso@rsx-11.mit.edu>
 
        * kdb_dbm.c: Don't cast dbm_close() to void, because dbm_close is
index 37ae53a5a305697f7a051fbd0fecc4b3ed2b5dd4..c8feb08a21bf2fd82e8179798e1ed99f86c4223b 100644 (file)
@@ -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;
        }
index 25dc5c3ecd7e1cb027c9f4a8780f3fc1ebefaddb..377ebba9f318fc8395671689d3dd7c1c43b798db 100644 (file)
@@ -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,