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