Fix signature of hdb_generate_key_set_password()
The change to the signature of hdb_generate_key_set_password() in Heimdal 7.1 broke API/ABI compatibility with previous releases. We fix this by renaming it hdb_generate_key_set_password_with_ks_tuple() and creating a new hdb_generate_key_set_password() which calls our new function with zeroes for the added arguments. Issue #246 https://github.com/heimdal/heimdal/issues/246
This commit is contained in:

committed by
Viktor Dukhovni

parent
ae432b0264
commit
4303174a49
@@ -772,10 +772,11 @@ hdb_generate_key_set(krb5_context context, krb5_principal principal,
|
||||
|
||||
|
||||
krb5_error_code
|
||||
hdb_generate_key_set_password(krb5_context context,
|
||||
hdb_generate_key_set_password_with_ks_tuple(krb5_context context,
|
||||
krb5_principal principal,
|
||||
const char *password,
|
||||
krb5_key_salt_tuple *ks_tuple, int n_ks_tuple,
|
||||
krb5_key_salt_tuple *ks_tuple,
|
||||
int n_ks_tuple,
|
||||
Key **keys, size_t *num_keys)
|
||||
{
|
||||
krb5_error_code ret;
|
||||
@@ -809,3 +810,16 @@ hdb_generate_key_set_password(krb5_context context,
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
krb5_error_code
|
||||
hdb_generate_key_set_password(krb5_context context,
|
||||
krb5_principal principal,
|
||||
const char *password,
|
||||
Key **keys, size_t *num_keys)
|
||||
{
|
||||
|
||||
return hdb_generate_key_set_password_with_ks_tuple(context, principal,
|
||||
password, NULL, 0,
|
||||
keys, num_keys);
|
||||
}
|
||||
|
@@ -94,7 +94,7 @@ main(int argc, char **argv)
|
||||
*keyset.set_time = time(NULL);
|
||||
|
||||
ret = hdb_generate_key_set_password(context, principal, password_str,
|
||||
NULL, 0, &keyset.keys.val, &len);
|
||||
&keyset.keys.val, &len);
|
||||
if (ret)
|
||||
krb5_err(context, 1, ret, "hdb_generate_key_set_password");
|
||||
keyset.keys.len = len;
|
||||
|
@@ -44,6 +44,7 @@ HEIMDAL_HDB_1.0 {
|
||||
hdb_free_master_key;
|
||||
hdb_generate_key_set;
|
||||
hdb_generate_key_set_password;
|
||||
hdb_generate_key_set_password_with_ks_tuple;
|
||||
hdb_get_dbinfo;
|
||||
hdb_init_db;
|
||||
hdb_key2principal;
|
||||
|
@@ -50,7 +50,7 @@ _kadm5_set_keys(kadm5_server_context *context,
|
||||
size_t num_keys;
|
||||
kadm5_ret_t ret;
|
||||
|
||||
ret = hdb_generate_key_set_password(context->context,
|
||||
ret = hdb_generate_key_set_password_with_ks_tuple(context->context,
|
||||
ent->principal,
|
||||
password,
|
||||
ks_tuple, n_ks_tuple,
|
||||
|
Reference in New Issue
Block a user