17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate  * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
37c478bd9Sstevel@tonic-gate  *
47c478bd9Sstevel@tonic-gate  *	Openvision retains the copyright to derivative works of
57c478bd9Sstevel@tonic-gate  *	this source code.  Do *NOT* create a derivative of this
67c478bd9Sstevel@tonic-gate  *	source code before consulting with your legal department.
77c478bd9Sstevel@tonic-gate  *	Do *NOT* integrate *ANY* of this source code into another
87c478bd9Sstevel@tonic-gate  *	product before consulting with your legal department.
97c478bd9Sstevel@tonic-gate  *
107c478bd9Sstevel@tonic-gate  *	For further information, read the top-level Openvision
117c478bd9Sstevel@tonic-gate  *	copyright which is contained in the top-level MIT Kerberos
127c478bd9Sstevel@tonic-gate  *	copyright.
137c478bd9Sstevel@tonic-gate  *
147c478bd9Sstevel@tonic-gate  * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
157c478bd9Sstevel@tonic-gate  *
167c478bd9Sstevel@tonic-gate  */
177c478bd9Sstevel@tonic-gate 
187c478bd9Sstevel@tonic-gate 
197c478bd9Sstevel@tonic-gate #include <kadm5/admin.h>
2056a424ccSmp #include "misc.h"
217c478bd9Sstevel@tonic-gate 
227c478bd9Sstevel@tonic-gate /*
237c478bd9Sstevel@tonic-gate  * In server_stubs.c, kadmind has to be able to call kadm5 functions
247c478bd9Sstevel@tonic-gate  * with the arguments appropriate for any api version.  Because of the
257c478bd9Sstevel@tonic-gate  * prototypes in admin.h, however, the compiler will only allow one
267c478bd9Sstevel@tonic-gate  * set of arguments to be passed.  This file exports the old api
277c478bd9Sstevel@tonic-gate  * definitions with a different name, so they can be called from
287c478bd9Sstevel@tonic-gate  * server_stubs.c, and just passes on the call to the real api
297c478bd9Sstevel@tonic-gate  * function; it uses the old api version, however, so it can actually
307c478bd9Sstevel@tonic-gate  * call the real api functions whereas server_stubs.c cannot.
317c478bd9Sstevel@tonic-gate  *
327c478bd9Sstevel@tonic-gate  * This is most useful for functions like kadm5_get_principal that
337c478bd9Sstevel@tonic-gate  * take a different number of arguments based on API version.  For
347c478bd9Sstevel@tonic-gate  * kadm5_get_policy, the same thing could be accomplished with
357c478bd9Sstevel@tonic-gate  * typecasts instead.
367c478bd9Sstevel@tonic-gate  */
377c478bd9Sstevel@tonic-gate 
kadm5_get_principal_v1(void * server_handle,krb5_principal principal,kadm5_principal_ent_t_v1 * ent)3856a424ccSmp kadm5_ret_t kadm5_get_principal_v1(void *server_handle,
39*2a8bcb4eSToomas Soome 				  krb5_principal principal,
4056a424ccSmp 				  kadm5_principal_ent_t_v1 *ent)
417c478bd9Sstevel@tonic-gate {
4256a424ccSmp      return kadm5_get_principal(server_handle, principal,(kadm5_principal_ent_t) ent, 0);
437c478bd9Sstevel@tonic-gate }
447c478bd9Sstevel@tonic-gate 
kadm5_get_policy_v1(void * server_handle,kadm5_policy_t name,kadm5_policy_ent_t * ent)4556a424ccSmp kadm5_ret_t kadm5_get_policy_v1(void *server_handle, kadm5_policy_t name,
4656a424ccSmp 				kadm5_policy_ent_t *ent)
477c478bd9Sstevel@tonic-gate {
4856a424ccSmp      return kadm5_get_policy(server_handle, name,(kadm5_policy_ent_t) ent);
497c478bd9Sstevel@tonic-gate }
50