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

@@ -534,7 +534,27 @@ typedef struct krb5_cc_ops {
/* Add new functions here for versions 6 and above */
} krb5_cc_ops;
typedef struct heim_config_binding krb5_config_binding;
/*
* krb5_config_binding is identical to struct heim_config_binding
* within heimbase.h. Its format is public and used by callers of
* krb5_config_get_list() and krb5_config_vget_list().
*/
enum krb5_config_type {
krb5_config_string,
krb5_config_list,
};
struct krb5_config_binding {
enum krb5_config_type type;
char *name;
struct krb5_config_binding *next;
union {
char *string;
struct krb5_config_binding *list;
void *generic;
} u;
};
typedef struct krb5_config_binding krb5_config_binding;
typedef krb5_config_binding krb5_config_section;
typedef struct krb5_ticket {