+2003-06-13 Tom Yu <tlyu@mit.edu>
+
+ * server_kdb.c (kdb_init_hist): Force history principal's key to
+ be of the same enctype as the master key, as searches for it later
+ on explicitly specify the enctype.
+
2003-04-01 Tom Yu <tlyu@mit.edu>
* Makefile.in: Remove $(SHLIB_DBLIB_DEPS) and related variables.
int ret = 0;
char *realm, *hist_name;
krb5_key_data *key_data;
+ krb5_key_salt_tuple ks[1];
if (r == NULL) {
if ((ret = krb5_get_default_realm(handle->context, &realm)))
history principal, anyway. */
hist_kvno = 2;
-
- ret = kadm5_create_principal(handle, &ent,
- (KADM5_PRINCIPAL | KADM5_MAX_LIFE |
- KADM5_ATTRIBUTES),
- "to-be-random");
+ ks[0].ks_enctype = handle->params.enctype;
+ ks[0].ks_salttype = KRB5_KDB_SALTTYPE_NORMAL;
+ ret = kadm5_create_principal_3(handle, &ent,
+ (KADM5_PRINCIPAL | KADM5_MAX_LIFE |
+ KADM5_ATTRIBUTES),
+ 1, ks,
+ "to-be-random");
if (ret)
goto done;
hist_princ = NULL;
- ret = kadm5_randkey_principal(handle, ent.principal, NULL, NULL);
+ ret = kadm5_randkey_principal_3(handle, ent.principal, 0, 1, ks,
+ NULL, NULL);
hist_princ = ent.principal;