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