base|krb5: struct krb5_config_binding is public

ea90ca8666
("Move some infra bits of lib/krb5/ to lib/base/ (2)") introduced
struct heim_config_binding to heimbase.h and removed the
struct krb5_config_binding definition from krb5.h.  It changed
the krb5_config_binding typedef to be based upon the heim_config_binding
typedef.

These changes broke out of tree callers of krb5_config_get_list()
and krb5_config_vget_list().  The internals of struct krb5_config_binding
are required by callers of krb5_config_get_list() and krb5_config_vget_list()
and the names must remain the same.

This change restores struct krb5_config_binding to krb5.h.  The
structure cannot be changed because it is public and leaves struct
heim_config_binding as an independent structure definition within
heimbase.h.  As a result struct heim_config_binding in heimbase.h must
remain binary compatible until such time as krb5_config_get_list() and
krb5_config_vget_list() are no longer supported.

Change-Id: I69b4fda3f656cc8daa8f5fcd0c7151cee222fc8c
This commit is contained in:
Jeffrey Altman
2020-05-28 13:50:49 -04:00
committed by Nico Williams
parent 44b2d68536
commit 07ee8fd3f4
5 changed files with 150 additions and 64 deletions

View File

@@ -120,15 +120,17 @@ struct heim_plugin_data {
heim_get_instance_func_t get_instance;
};
typedef struct heim_config_binding heim_config_binding;
/*
* heim_config_binding is identical to struct krb5_config_binding
* within krb5.h. Its format is public and used by callers of
* krb5_config_get_list() and krb5_config_vget_list().
*/
enum heim_config_type {
heim_config_string,
heim_config_list,
};
struct heim_config_binding {
enum {
heim_config_string,
heim_config_list,
/* For compatibility in krb5 code */
krb5_config_string = heim_config_string,
krb5_config_list = heim_config_list,
} type;
enum heim_config_type type;
char *name;
struct heim_config_binding *next;
union {
@@ -137,6 +139,7 @@ struct heim_config_binding {
void *generic;
} u;
};
typedef struct heim_config_binding heim_config_binding;
typedef struct heim_config_binding heim_config_section;
/*