1 /*
2  * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
3  *
4  *	Openvision retains the copyright to derivative works of
5  *	this source code.  Do *NOT* create a derivative of this
6  *	source code before consulting with your legal department.
7  *	Do *NOT* integrate *ANY* of this source code into another
8  *	product before consulting with your legal department.
9  *
10  *	For further information, read the top-level Openvision
11  *	copyright which is contained in the top-level MIT Kerberos
12  *	copyright.
13  *
14  * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
15  *
16  */
17 
18 
19 #include <kadm5/admin.h>
20 #include "misc.h"
21 
22 /*
23  * In server_stubs.c, kadmind has to be able to call kadm5 functions
24  * with the arguments appropriate for any api version.  Because of the
25  * prototypes in admin.h, however, the compiler will only allow one
26  * set of arguments to be passed.  This file exports the old api
27  * definitions with a different name, so they can be called from
28  * server_stubs.c, and just passes on the call to the real api
29  * function; it uses the old api version, however, so it can actually
30  * call the real api functions whereas server_stubs.c cannot.
31  *
32  * This is most useful for functions like kadm5_get_principal that
33  * take a different number of arguments based on API version.  For
34  * kadm5_get_policy, the same thing could be accomplished with
35  * typecasts instead.
36  */
37 
kadm5_get_principal_v1(void * server_handle,krb5_principal principal,kadm5_principal_ent_t_v1 * ent)38 kadm5_ret_t kadm5_get_principal_v1(void *server_handle,
39 				  krb5_principal principal,
40 				  kadm5_principal_ent_t_v1 *ent)
41 {
42      return kadm5_get_principal(server_handle, principal,(kadm5_principal_ent_t) ent, 0);
43 }
44 
kadm5_get_policy_v1(void * server_handle,kadm5_policy_t name,kadm5_policy_ent_t * ent)45 kadm5_ret_t kadm5_get_policy_v1(void *server_handle, kadm5_policy_t name,
46 				kadm5_policy_ent_t *ent)
47 {
48      return kadm5_get_policy(server_handle, name,(kadm5_policy_ent_t) ent);
49 }
50