10Sstevel@tonic-gate /* 20Sstevel@tonic-gate * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING 30Sstevel@tonic-gate * 40Sstevel@tonic-gate * Openvision retains the copyright to derivative works of 50Sstevel@tonic-gate * this source code. Do *NOT* create a derivative of this 60Sstevel@tonic-gate * source code before consulting with your legal department. 70Sstevel@tonic-gate * Do *NOT* integrate *ANY* of this source code into another 80Sstevel@tonic-gate * product before consulting with your legal department. 90Sstevel@tonic-gate * 100Sstevel@tonic-gate * For further information, read the top-level Openvision 110Sstevel@tonic-gate * copyright which is contained in the top-level MIT Kerberos 120Sstevel@tonic-gate * copyright. 130Sstevel@tonic-gate * 140Sstevel@tonic-gate * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING 150Sstevel@tonic-gate * 160Sstevel@tonic-gate */ 170Sstevel@tonic-gate 180Sstevel@tonic-gate 190Sstevel@tonic-gate /* 200Sstevel@tonic-gate * Copyright 1993 OpenVision Technologies, Inc., All Rights Reserved 210Sstevel@tonic-gate * 22*7934SMark.Phalan@Sun.COM * $Header$ 230Sstevel@tonic-gate * 240Sstevel@tonic-gate */ 250Sstevel@tonic-gate 260Sstevel@tonic-gate #if !defined(lint) && !defined(__CODECENTER__) 27*7934SMark.Phalan@Sun.COM static char *rcsid = "$Header$"; 280Sstevel@tonic-gate #endif 290Sstevel@tonic-gate #include <kadm5/admin.h> 300Sstevel@tonic-gate #include <stdlib.h> 310Sstevel@tonic-gate #include "server_internal.h" 320Sstevel@tonic-gate 330Sstevel@tonic-gate kadm5_ret_t kadm5_free_principal_ent(void * server_handle,kadm5_principal_ent_t val)340Sstevel@tonic-gatekadm5_free_principal_ent(void *server_handle, 350Sstevel@tonic-gate kadm5_principal_ent_t val) 360Sstevel@tonic-gate { 370Sstevel@tonic-gate kadm5_server_handle_t handle = server_handle; 380Sstevel@tonic-gate 390Sstevel@tonic-gate CHECK_HANDLE(server_handle); 400Sstevel@tonic-gate 410Sstevel@tonic-gate if(val) { 420Sstevel@tonic-gate if(val->principal) 430Sstevel@tonic-gate krb5_free_principal(handle->context, val->principal); 440Sstevel@tonic-gate if(val->mod_name) 450Sstevel@tonic-gate krb5_free_principal(handle->context, val->mod_name); 460Sstevel@tonic-gate if(val->policy) 470Sstevel@tonic-gate free(val->policy); 480Sstevel@tonic-gate 490Sstevel@tonic-gate /* XXX free key_data and tl_data */ 500Sstevel@tonic-gate 510Sstevel@tonic-gate if (handle->api_version == KADM5_API_VERSION_1) 520Sstevel@tonic-gate free(val); 530Sstevel@tonic-gate } 540Sstevel@tonic-gate return KADM5_OK; 550Sstevel@tonic-gate } 56