Fix wrong context bugs in kadmin randkey

This commit is contained in:
Nicolas Williams
2019-01-03 22:26:31 -06:00
parent e739c4d0c2
commit d5536d4dd3
2 changed files with 7 additions and 6 deletions

View File

@@ -129,12 +129,12 @@ kadm5_s_randkey_principal(void *server_handle,
if (keepold) {
ret = hdb_add_current_keys_to_history(context->context, &ent.entry);
if (ret == 0 && keepold == 1)
ret = hdb_prune_keys_kvno(context, &ent.entry, 0);
ret = hdb_prune_keys_kvno(context->context, &ent.entry, 0);
if (ret)
goto out3;
} else {
/* Remove all key history */
ret = hdb_clear_extension(context, &ent.entry,
ret = hdb_clear_extension(context->context, &ent.entry,
choice_HDB_extension_data_hist_keys);
if (ret)
goto out3;