diff options
author | Nicolas Williams <nico@cryptonector.com> | 2012-07-18 16:27:35 -0500 |
---|---|---|
committer | Greg Hudson <ghudson@mit.edu> | 2012-07-30 19:11:28 -0400 |
commit | 5829ca2b348974e52a67b553afc7f7491007c33a (patch) | |
tree | 3fdbcdfc56a26445c2f2fce9fb72b6deddb28d0f /src/lib/kadm5/misc_free.c | |
parent | 796366a03ea170efb937913acae36a2083a5329e (diff) | |
download | krb5-5829ca2b348974e52a67b553afc7f7491007c33a.tar.gz krb5-5829ca2b348974e52a67b553afc7f7491007c33a.tar.xz krb5-5829ca2b348974e52a67b553afc7f7491007c33a.zip |
Policy extensions + new policy: allowed ks types
This simply adds KADM5_API_VERSION_4 and various fields to the
policy structures:
- attributes (policy-ish principal attributes)
- max_life (max ticket life)
- max_renewable_life (max ticket renewable life)
- allowed_keysalts (allowed key/salt types)
- TL data (future policy extensions)
Of these only allowed_keysalts is currently implemented.
Some refactoring of TL data handling is also done.
ticket: 7223 (new)
Diffstat (limited to 'src/lib/kadm5/misc_free.c')
-rw-r--r-- | src/lib/kadm5/misc_free.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/lib/kadm5/misc_free.c b/src/lib/kadm5/misc_free.c index 1d7079199..497b8c2b6 100644 --- a/src/lib/kadm5/misc_free.c +++ b/src/lib/kadm5/misc_free.c @@ -11,10 +11,21 @@ kadm5_ret_t kadm5_free_policy_ent(void *server_handle, kadm5_policy_ent_t val) { + krb5_tl_data *tl_next; + _KADM5_CHECK_HANDLE(server_handle); - if (val) - free(val->policy); + if (val == NULL) + return KADM5_OK; + + free(val->policy); + free(val->allowed_keysalts); + for (; val->tl_data; val->tl_data = tl_next) { + tl_next = val->tl_data->tl_data_next; + free(val->tl_data->tl_data_contents); + free(val->tl_data); + } + memset(val, 0, sizeof(*val)); return KADM5_OK; } |