In kadm5_randkey_principal_3, after updating the principal's keys,
update its mkvno tl-data to indicate the master key version we
encrypted the new keys with.
ticket: 7994
target_version: 1.13
tags: pullup
krb5_boolean have_pol = FALSE;
kadm5_server_handle_t handle = server_handle;
krb5_keyblock *act_mkey;
+ krb5_kvno act_kvno;
int new_n_ks_tuple = 0;
krb5_key_salt_tuple *new_ks_tuple = NULL;
new_n_ks_tuple = 1;
}
- ret = kdb_get_active_mkey(handle, NULL, &act_mkey);
+ ret = kdb_get_active_mkey(handle, &act_kvno, &act_mkey);
if (ret)
goto done;
if (ret)
goto done;
+ ret = krb5_dbe_update_mkvno(handle->context, kdb, act_kvno);
+ if (ret)
+ goto done;
+
kdb->attributes &= ~KRB5_KDB_REQUIRES_PWCHANGE;
ret = krb5_timeofday(handle->context, &now);