(values_to_ent): convert key data correctly
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6347 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -267,6 +267,10 @@ ent_to_values(krb5_context context,
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* convert the kadm4 values in `vals' to `ent' (and `mask')
|
||||||
|
*/
|
||||||
|
|
||||||
static krb5_error_code
|
static krb5_error_code
|
||||||
values_to_ent(krb5_context context,
|
values_to_ent(krb5_context context,
|
||||||
Kadm_vals *vals,
|
Kadm_vals *vals,
|
||||||
@@ -315,10 +319,10 @@ values_to_ent(krb5_context context,
|
|||||||
if((ent->key_data[i].key_data_contents[0] = malloc(8)) == NULL)
|
if((ent->key_data[i].key_data_contents[0] = malloc(8)) == NULL)
|
||||||
return ENOMEM;
|
return ENOMEM;
|
||||||
memcpy(ent->key_data[i].key_data_contents[0],
|
memcpy(ent->key_data[i].key_data_contents[0],
|
||||||
&vals->key_high,
|
&vals->key_low,
|
||||||
4);
|
4);
|
||||||
memcpy((char*)ent->key_data[i].key_data_contents[0] + 4,
|
memcpy((char*)ent->key_data[i].key_data_contents[0] + 4,
|
||||||
&vals->key_low,
|
&vals->key_high,
|
||||||
4);
|
4);
|
||||||
ent->key_data[i].key_data_type[1] = KRB5_PW_SALT;
|
ent->key_data[i].key_data_type[1] = KRB5_PW_SALT;
|
||||||
ent->key_data[i].key_data_length[1] = 0;
|
ent->key_data[i].key_data_length[1] = 0;
|
||||||
|
Reference in New Issue
Block a user