+Mon Oct 13 10:48:24 1997 Ezra Peisach <epeisach@mit.edu>
+
+ * alt_prof.c (kadm5_get_config_params): When KADM5_CONFIG_ENCTYPES
+ is set on the input parameters, allocate a new copy of the
+ key_salts for the output parameters.
+ (kadm5_free_config_params): Free the admin_server and admin_lockfile
+ names.
+
Tue Oct 7 07:48:12 1997 Ezra Peisach <epeisach@mit.edu>
* logger.c: Include ctype.h for isspace definition.
#include <stdio.h>
#include <ctype.h>
+
+static krb5_key_salt_tuple *copy_key_salt_tuple(ksalt, len)
+krb5_key_salt_tuple *ksalt;
+krb5_int32 len;
+{
+ int i;
+ krb5_key_salt_tuple *knew;
+
+ if(len == 0) return 0;
+ if((knew = (krb5_key_salt_tuple *)
+ malloc((len ) * sizeof(krb5_key_salt_tuple)))) {
+ memcpy(knew, ksalt, len * sizeof(krb5_key_salt_tuple));
+ return knew;
+ }
+ return 0;
+}
+
/*
* krb5_aprof_init() - Initialize alternate profile context.
*
/* Get the value for the supported enctype/salttype matrix */
hierarchy[2] = "supported_enctypes";
if (params_in->mask & KADM5_CONFIG_ENCTYPES) {
- params.mask |= KADM5_CONFIG_ENCTYPES;
- params.keysalts = params_in->keysalts;
- params.num_keysalts = params_in->num_keysalts;
+ params.keysalts = copy_key_salt_tuple(params_in->keysalts,
+ params_in->num_keysalts);
+ if(params.keysalts) {
+ params.mask |= KADM5_CONFIG_ENCTYPES;
+ params.num_keysalts = params_in->num_keysalts;
+ }
} else {
svalue = NULL;
if (aprofile)
krb5_xfree(params->stash_file);
if (params->keysalts)
krb5_xfree(params->keysalts);
+ if (params->admin_server)
+ free(params->admin_server);
if (params->admin_keytab)
free(params->admin_keytab);
if (params->dict_file)
free(params->realm);
if (params->admin_dbname)
free(params->admin_dbname);
+ if (params->admin_lockfile)
+ free(params->admin_lockfile);
+
}
return(0);
}