Fix stupid bug from the last change
authorTheodore Tso <tytso@mit.edu>
Sat, 25 Mar 1995 03:30:07 +0000 (03:30 +0000)
committerTheodore Tso <tytso@mit.edu>
Sat, 25 Mar 1995 03:30:07 +0000 (03:30 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5242 dc483132-0cff-0310-8789-dd5450dbe970

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

index c8feb08a21bf2fd82e8179798e1ed99f86c4223b..1249ef4c7f0ab043c6130f9fdea0200a48d4be36 100644 (file)
@@ -93,7 +93,7 @@ krb5_db_fetch_mkey(context, mname, eblock, fromkeyboard, twice, salt, key)
 
     } else {
        /* from somewhere else */
-       krb5_keytype keytype;
+        krb5_octet keytype;
        char defkeyfile[MAXPATHLEN+1];
        krb5_data *realm = krb5_princ_realm(context, mname);
        FILE *kf;
index 377ebba9f318fc8395671689d3dd7c1c43b798db..742a6ebce30ce38bfd96053327abf2dbc13206d2 100644 (file)
@@ -54,6 +54,7 @@ krb5_db_store_mkey(context, keyfile, mname, key)
 {
     FILE *kf;
     krb5_error_code retval = 0;
+    krb5_octet keytype;
     char defkeyfile[MAXPATHLEN+1];
     krb5_data *realm = krb5_princ_realm(context, mname);
 #if defined(unix) || defined(__unix__)
@@ -83,7 +84,8 @@ krb5_db_store_mkey(context, keyfile, mname, key)
 #endif
        return errno;
     }
-    if ((fwrite((krb5_pointer) &key->keytype,
+    keytype = key->keytype;
+    if ((fwrite((krb5_pointer) &keytype,
                1, 1, kf) != 1) ||
        (fwrite((krb5_pointer) &key->length,
                sizeof(key->length), 1, kf) != 1) ||