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 23 /* 24 * In server_stubs.c, kadmind has to be able to call kadm5 functions 25 * with the arguments appropriate for any api version. Because of the 26 * prototypes in admin.h, however, the compiler will only allow one 27 * set of arguments to be passed. This file exports the old api 28 * definitions with a different name, so they can be called from 29 * server_stubs.c, and just passes on the call to the real api 30 * function; it uses the old api version, however, so it can actually 31 * call the real api functions whereas server_stubs.c cannot. 32 * 33 * This is most useful for functions like kadm5_get_principal that 34 * take a different number of arguments based on API version. For 35 * kadm5_get_policy, the same thing could be accomplished with 36 * typecasts instead. 37 */ 38 39 kadm5_ret_t 40 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, 45 (kadm5_principal_ent_t) ent, 0)); 46 } 47 48 kadm5_ret_t 49 kadm5_get_policy_v1(void *server_handle, kadm5_policy_t name, 50 kadm5_policy_ent_t * ent) 51 { 52 return (kadm5_get_policy(server_handle, name, 53 (kadm5_policy_ent_t) ent)); 54 } 55