xref: /onnv-gate/usr/src/cmd/krb5/kadmin/server/server_glue_v1.c (revision 2881:ea6360e7e1c5)
10Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
20Sstevel@tonic-gate 
30Sstevel@tonic-gate /*
40Sstevel@tonic-gate  * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
50Sstevel@tonic-gate  *
60Sstevel@tonic-gate  *	Openvision retains the copyright to derivative works of
70Sstevel@tonic-gate  *	this source code.  Do *NOT* create a derivative of this
80Sstevel@tonic-gate  *	source code before consulting with your legal department.
90Sstevel@tonic-gate  *	Do *NOT* integrate *ANY* of this source code into another
100Sstevel@tonic-gate  *	product before consulting with your legal department.
110Sstevel@tonic-gate  *
120Sstevel@tonic-gate  *	For further information, read the top-level Openvision
130Sstevel@tonic-gate  *	copyright which is contained in the top-level MIT Kerberos
140Sstevel@tonic-gate  *	copyright.
150Sstevel@tonic-gate  *
160Sstevel@tonic-gate  * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
170Sstevel@tonic-gate  *
180Sstevel@tonic-gate  */
190Sstevel@tonic-gate 
200Sstevel@tonic-gate 
210Sstevel@tonic-gate #include <kadm5/admin.h>
22*2881Smp153739 #include "misc.h"
230Sstevel@tonic-gate 
240Sstevel@tonic-gate /*
250Sstevel@tonic-gate  * In server_stubs.c, kadmind has to be able to call kadm5 functions
260Sstevel@tonic-gate  * with the arguments appropriate for any api version.  Because of the
270Sstevel@tonic-gate  * prototypes in admin.h, however, the compiler will only allow one
280Sstevel@tonic-gate  * set of arguments to be passed.  This file exports the old api
290Sstevel@tonic-gate  * definitions with a different name, so they can be called from
300Sstevel@tonic-gate  * server_stubs.c, and just passes on the call to the real api
310Sstevel@tonic-gate  * function; it uses the old api version, however, so it can actually
320Sstevel@tonic-gate  * call the real api functions whereas server_stubs.c cannot.
330Sstevel@tonic-gate  *
340Sstevel@tonic-gate  * This is most useful for functions like kadm5_get_principal that
350Sstevel@tonic-gate  * take a different number of arguments based on API version.  For
360Sstevel@tonic-gate  * kadm5_get_policy, the same thing could be accomplished with
370Sstevel@tonic-gate  * typecasts instead.
380Sstevel@tonic-gate  */
390Sstevel@tonic-gate 
kadm5_get_principal_v1(void * server_handle,krb5_principal principal,kadm5_principal_ent_t_v1 * ent)40*2881Smp153739 kadm5_ret_t kadm5_get_principal_v1(void *server_handle,
41*2881Smp153739 				  krb5_principal principal,
42*2881Smp153739 				  kadm5_principal_ent_t_v1 *ent)
430Sstevel@tonic-gate {
44*2881Smp153739      return kadm5_get_principal(server_handle, principal,(kadm5_principal_ent_t) ent, 0);
450Sstevel@tonic-gate }
460Sstevel@tonic-gate 
kadm5_get_policy_v1(void * server_handle,kadm5_policy_t name,kadm5_policy_ent_t * ent)47*2881Smp153739 kadm5_ret_t kadm5_get_policy_v1(void *server_handle, kadm5_policy_t name,
48*2881Smp153739 				kadm5_policy_ent_t *ent)
490Sstevel@tonic-gate {
50*2881Smp153739      return kadm5_get_policy(server_handle, name,(kadm5_policy_ent_t) ent);
510Sstevel@tonic-gate }
52