From 9ed12e2d114d8f386528aebabc44e2dab7ee6634 Mon Sep 17 00:00:00 2001 From: Barry Jaspan Date: Wed, 28 May 1997 17:35:05 +0000 Subject: [PATCH] * admin.h: add prototype for kadm5_setkey_principal * misc_free.c (kadm5_free_key_data): add kadm5_free_data git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10089 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/kadm5/ChangeLog | 6 ++++++ src/lib/kadm5/admin.h | 5 +++++ src/lib/kadm5/misc_free.c | 19 ++++++++++++++++++- 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/src/lib/kadm5/ChangeLog b/src/lib/kadm5/ChangeLog index dc016db57..45b403c73 100644 --- a/src/lib/kadm5/ChangeLog +++ b/src/lib/kadm5/ChangeLog @@ -1,3 +1,9 @@ +Wed May 28 13:34:17 1997 Barry Jaspan + + * admin.h: add prototype for kadm5_setkey_principal + + * misc_free.c (kadm5_free_key_data): add kadm5_free_data + Mon Mar 31 17:41:11 1997 Barry Jaspan * kadm_err.et, kadm_rpc.h, kadm_rpc_xdr.c: add support for diff --git a/src/lib/kadm5/admin.h b/src/lib/kadm5/admin.h index d45e16e9c..0c2501b3f 100644 --- a/src/lib/kadm5/admin.h +++ b/src/lib/kadm5/admin.h @@ -331,6 +331,11 @@ kadm5_ret_t kadm5_randkey_principal(void *server_handle, krb5_keyblock **keyblocks, int *n_keys); #endif +kadm5_ret_t kadm5_setkey_principal(void *server_handle, + krb5_principal principal, + krb5_keyblock *keyblocks, + int n_keys); + kadm5_ret_t kadm5_create_policy(void *server_handle, kadm5_policy_ent_t ent, long mask); diff --git a/src/lib/kadm5/misc_free.c b/src/lib/kadm5/misc_free.c index dbf91d3ee..9dc91b53f 100644 --- a/src/lib/kadm5/misc_free.c +++ b/src/lib/kadm5/misc_free.c @@ -38,7 +38,6 @@ kadm5_ret_t return KADM5_OK; } - /* XXX this ought to be in libkrb5.a, but isn't */ kadm5_ret_t krb5_free_key_data_contents(context, key) krb5_context context; @@ -56,6 +55,24 @@ kadm5_ret_t krb5_free_key_data_contents(context, key) return KADM5_OK; } +kadm5_ret_t kadm5_free_key_data(void *server_handle, + krb5_int16 *n_key_data, + krb5_key_data *key_data) +{ + kadm5_server_handle_t handle = server_handle; + int i, nkeys = (int) *n_key_data; + + _KADM5_CHECK_HANDLE(server_handle); + + if (key_data == NULL) + return KADM5_OK; + + for (i = 0; i < nkeys; i++) + krb5_free_key_data_contents(handle->context, &key_data[i]); + free(key_data); + return KADM5_OK; +} + kadm5_ret_t kadm5_free_principal_ent(void *server_handle, kadm5_principal_ent_t val) -- 2.26.2