+Mon Feb 26 22:13:45 1996 Mark Eichin <eichin@cygnus.com>
+
+ * dump.c (process_k5beta_record): since V4 salt type has no data
+ either, only set key_data_ver to 1 for data_type 0 with 0-length
+ salt. Also, don't include alternate key if akey has all-zero type
+ and length in both fields.
+
Sat Feb 24 04:02:18 1996 Mark W. Eichin <eichin@cygnus.com>
* dump.c (process_k5beta_record): encrypted keys used to have 4
&name_len, &mod_name_len, &key_len,
&alt_key_len, &salt_len, &alt_salt_len);
if (nmatched == 6) {
- pkey->key_data_length[0] = key_len;
+ pkey->key_data_length[0] = key_len;
akey->key_data_length[0] = alt_key_len;
pkey->key_data_length[1] = salt_len;
akey->key_data_length[1] = alt_salt_len;
int one = 1;
dbent.len = KRB5_KDB_V1_BASE_LENGTH;
- pkey->key_data_ver = (pkey->key_data_length[1]) ?
+ pkey->key_data_ver = (pkey->key_data_type[1] || pkey->key_data_length[1]) ?
2 : 1;
- akey->key_data_ver = (akey->key_data_length[1]) ?
+ akey->key_data_ver = (akey->key_data_type[1] || akey->key_data_length[1]) ?
2 : 1;
if ((pkey->key_data_type[0] ==
akey->key_data_type[0]) &&
(pkey->key_data_type[1] ==
akey->key_data_type[1]))
dbent.n_key_data--;
+ else if ((akey->key_data_type[0] == 0)
+ && (akey->key_data_length[0] == 0)
+ && (akey->key_data_type[1] == 0)
+ && (akey->key_data_length[1] == 0))
+ dbent.n_key_data--;
if ((kret = krb5_db_put_principal(kcontext,
&dbent,
&one)) ||