1 /* 2 * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 3 * Use is subject to license terms. 4 */ 5 6 #pragma ident "%Z%%M% %I% %E% SMI" 7 8 /* 9 * lib/kdb/kdb_ldap/ldap_exp.c 10 * 11 * Copyright (c) 2004-2005, Novell, Inc. 12 * All rights reserved. 13 * 14 * Redistribution and use in source and binary forms, with or without 15 * modification, are permitted provided that the following conditions are met: 16 * 17 * * Redistributions of source code must retain the above copyright notice, 18 * this list of conditions and the following disclaimer. 19 * * Redistributions in binary form must reproduce the above copyright 20 * notice, this list of conditions and the following disclaimer in the 21 * documentation and/or other materials provided with the distribution. 22 * * The copyright holder's name is not used to endorse or promote products 23 * derived from this software without specific prior written permission. 24 * 25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 26 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 27 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 28 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 29 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 30 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 31 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 32 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 33 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 34 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 35 * POSSIBILITY OF SUCH DAMAGE. 36 */ 37 38 #include "k5-int.h" 39 #if HAVE_UNISTD_H 40 #include <unistd.h> 41 #endif 42 #include <stdio.h> 43 #include <errno.h> 44 #include <utime.h> 45 #include <kdb5.h> 46 #include "kdb_ldap.h" 47 #include "ldap_principal.h" 48 #include "ldap_pwd_policy.h" 49 50 51 /* 52 * Exposed API 53 */ 54 55 kdb_vftabl kdb_function_table = { 56 /* major version number 1 */ 1, 57 /* minor version number 0 */ 0, 58 /* Solaris Kerberos: iprop support */ 59 /* iprop_supported, not by ldap*/ 0, 60 /* init_library */ krb5_ldap_lib_init, 61 /* fini_library */ krb5_ldap_lib_cleanup, 62 /* init_module */ krb5_ldap_open, 63 /* fini_module */ krb5_ldap_close, 64 /* db_create */ krb5_ldap_create, 65 /* db_destroy */ krb5_ldap_delete_realm_1, 66 /* db_get_age */ krb5_ldap_db_get_age, 67 /* db_set_option */ krb5_ldap_set_option, 68 /* db_lock */ krb5_ldap_lock, 69 /* db_unlock */ krb5_ldap_unlock, 70 /* db_get_principal */ krb5_ldap_get_principal, 71 /* Solaris Kerberos: need a nolock for iprop, not used for this plugin */ 72 /* db_get_principal_nolock */ krb5_ldap_get_principal, 73 /* db_free_principal */ krb5_ldap_free_principal, 74 /* db_put_principal */ krb5_ldap_put_principal, 75 /* db_delete_principal */ krb5_ldap_delete_principal, 76 /* db_iterate */ krb5_ldap_iterate, 77 /* db_create_policy */ krb5_ldap_create_password_policy, 78 /* db_get_policy */ krb5_ldap_get_password_policy, 79 /* db_put_policy */ krb5_ldap_put_password_policy, 80 /* db_iter_policy */ krb5_ldap_iterate_password_policy, 81 /* db_delete_policy */ krb5_ldap_delete_password_policy, 82 /* db_free_policy */ krb5_ldap_free_password_policy, 83 /* db_supported_realms */ krb5_ldap_supported_realms, 84 /* db_free_supported_realms */ krb5_ldap_free_supported_realms, 85 /* errcode_2_string */ krb5_ldap_errcode_2_string, 86 /* release_errcode_string */ krb5_ldap_release_errcode_string, 87 /* db_alloc */ krb5_ldap_alloc, 88 /* db_free */ krb5_ldap_free, 89 /* optional functions */ 90 /* set_master_key */ krb5_ldap_set_mkey, 91 /* get_master_key */ krb5_ldap_get_mkey, 92 /* setup_master_key_name */ NULL, 93 /* store_master_key */ NULL, 94 /* fetch_master_key */ NULL /* krb5_ldap_fetch_mkey */, 95 /* verify_master_key */ NULL /* krb5_ldap_verify_master_key */, 96 /* Search enc type */ NULL, 97 /* db_change_pwd */ NULL 98 99 }; 100