+Thu Nov 7 11:41:08 1996 Ezra Peisach <epeisach@mit.edu>
+
+ * client_principal.c (kadm5_get_principal,
+ kadm5_modify_principal): For a V1 request, copy only the
+ memory that is allocated for the incomming principal.
+
Fri Oct 4 08:38:16 1996 Ezra Peisach <epeisach@kangaroo.mit.edu>
* client_principal.c (kadm5_randkey_principal): Do not assume that
CHECK_HANDLE(server_handle);
+ memset(&arg, 0, sizeof(arg));
arg.mask = mask;
arg.passwd = pw;
arg.api_version = handle->api_version;
if(princ == NULL)
return EINVAL;
- memcpy(&arg.rec, princ, sizeof(kadm5_principal_ent_rec));
+
+ if (handle->api_version == KADM5_API_VERSION_1) {
+ memcpy(&arg.rec, princ, sizeof(kadm5_principal_ent_rec_v1));
+ } else {
+ memcpy(&arg.rec, princ, sizeof(kadm5_principal_ent_rec));
+ }
if (handle->api_version == KADM5_API_VERSION_1) {
/*
* hack hack cough cough.
CHECK_HANDLE(server_handle);
+ memset(&arg, 0, sizeof(arg));
arg.mask = mask;
arg.api_version = handle->api_version;
/*
*/
if(princ == NULL)
return EINVAL;
- memcpy(&arg.rec, princ, sizeof(kadm5_principal_ent_rec));
+ if (handle->api_version == KADM5_API_VERSION_1) {
+ memcpy(&arg.rec, princ, sizeof(kadm5_principal_ent_rec_v1));
+ } else {
+ memcpy(&arg.rec, princ, sizeof(kadm5_principal_ent_rec));
+ }
if(!(mask & KADM5_POLICY))
arg.rec.policy = NULL;
if (! (mask & KADM5_KEY_DATA)) {