Fixes for updates of KADM5_KVNO but not KEY_DATA and vice-versa.
It turns out that updates of kvno but not key data and vice-versa are both, allowed and actually done (e.g, in kadmin's ank). Doing the right thing in these cases turns out to be a bit tricky, but this commit ought to do it.
This commit is contained in:
@@ -106,6 +106,10 @@ del_enctype(void *opt, int argc, char **argv)
|
||||
}
|
||||
|
||||
free (princ.key_data);
|
||||
if (j == 0) {
|
||||
free(new_key_data);
|
||||
new_key_data = NULL;
|
||||
}
|
||||
princ.n_key_data = j;
|
||||
princ.key_data = new_key_data;
|
||||
|
||||
|
Reference in New Issue
Block a user