+2000-02-18 Tom Yu <tlyu@mit.edu>
+
+ * kdb_cpw.c (krb5_dbe_crk):
+ (krb5_dbe_cpw): Fix to actually save old keys.
+
1999-10-26 Tom Yu <tlyu@mit.edu>
* Makefile.in: Clean up usage of CFLAGS, CPPFLAGS, DEFS, DEFINES,
krb5_db_entry * db_entry;
{
int key_data_count;
+ int n_new_key_data;
krb5_key_data * key_data;
krb5_error_code retval;
int kvno;
db_entry->n_key_data = key_data_count;
db_entry->key_data = key_data;
} else if (keepold) {
+ n_new_key_data = db_entry->n_key_data;
for (i = 0; i < key_data_count; i++) {
retval = krb5_dbe_create_key_data(context, db_entry);
if (retval) {
db_entry->key_data);
break;
}
+ db_entry->key_data[i+n_new_key_data] = key_data[i];
+ memset(&key_data[i], 0, sizeof(krb5_key_data));
}
} else {
cleanup_key_data(context, key_data_count, key_data);
krb5_db_entry * db_entry;
{
int key_data_count;
+ int n_new_key_data;
krb5_key_data * key_data;
krb5_error_code retval;
int old_kvno;
db_entry->n_key_data = key_data_count;
db_entry->key_data = key_data;
} else if (keepold) {
+ n_new_key_data = db_entry->n_key_data;
for (i = 0; i < key_data_count; i++) {
retval = krb5_dbe_create_key_data(context, db_entry);
if (retval) {
db_entry->key_data);
break;
}
+ db_entry->key_data[i+n_new_key_data] = key_data[i];
+ memset(&key_data[i], 0, sizeof(krb5_key_data));
}
} else {
cleanup_key_data(context, key_data_count, key_data);