Use function pointer trampoline for easier dual use (without radiation-hardening capability).
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3948 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -44,6 +44,24 @@
|
||||
|
||||
RCSID("$Id$");
|
||||
|
||||
static void
|
||||
set_funcs(kadm5_client_context *c)
|
||||
{
|
||||
#define SET(C, F) (C)->funcs.F = kadm5 ## _c_ ## F
|
||||
SET(c, chpass_principal);
|
||||
SET(c, chpass_principal);
|
||||
SET(c, create_principal);
|
||||
SET(c, delete_principal);
|
||||
SET(c, destroy);
|
||||
SET(c, flush);
|
||||
SET(c, get_principal);
|
||||
SET(c, get_principals);
|
||||
SET(c, get_privs);
|
||||
SET(c, modify_principal);
|
||||
SET(c, randkey_principal);
|
||||
SET(c, rename_principal);
|
||||
};
|
||||
|
||||
kadm5_ret_t
|
||||
_kadm5_c_init_context(kadm5_client_context **ctx,
|
||||
kadm5_config_params *params,
|
||||
@@ -53,6 +71,7 @@ _kadm5_c_init_context(kadm5_client_context **ctx,
|
||||
if(*ctx == NULL)
|
||||
return ENOMEM;
|
||||
memset(*ctx, 0, sizeof(**ctx));
|
||||
set_funcs(*ctx);
|
||||
(*ctx)->context = context;
|
||||
if(params->mask & KADM5_CONFIG_REALM)
|
||||
(*ctx)->realm = strdup(params->realm);
|
||||
|
Reference in New Issue
Block a user