Path: blob/main/crypto/krb5/src/plugins/kdb/ldap/ldap_exp.c
34914 views
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */1/* plugins/kdb/ldap/ldap_exp.c */2/*3* Copyright (c) 2004-2005, Novell, Inc.4* All rights reserved.5*6* Redistribution and use in source and binary forms, with or without7* modification, are permitted provided that the following conditions are met:8*9* * Redistributions of source code must retain the above copyright notice,10* this list of conditions and the following disclaimer.11* * Redistributions in binary form must reproduce the above copyright12* notice, this list of conditions and the following disclaimer in the13* documentation and/or other materials provided with the distribution.14* * The copyright holder's name is not used to endorse or promote products15* derived from this software without specific prior written permission.16*17* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"18* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE19* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE20* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE21* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR22* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF23* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS24* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN25* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)26* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE27* POSSIBILITY OF SUCH DAMAGE.28*/2930#include "k5-int.h"31#if HAVE_UNISTD_H32#include <unistd.h>33#endif34#include <stdio.h>35#include <errno.h>36#include <utime.h>37#include <kdb5.h>38#include "kdb_ldap.h"39#include "ldap_principal.h"40#include "ldap_pwd_policy.h"414243/*44* Exposed API45*/4647kdb_vftabl PLUGIN_SYMBOL_NAME(krb5_ldap, kdb_function_table) = {48KRB5_KDB_DAL_MAJOR_VERSION, /* major version number */490, /* minor version number 0 */50/* init_library */ krb5_ldap_lib_init,51/* fini_library */ krb5_ldap_lib_cleanup,52/* init_module */ krb5_ldap_open,53/* fini_module */ krb5_ldap_close,54/* create */ krb5_ldap_create,55/* destroy */ krb5_ldap_delete_realm_1,56/* get_age */ krb5_ldap_get_age,57/* lock */ krb5_ldap_lock,58/* unlock */ krb5_ldap_unlock,59/* get_principal */ krb5_ldap_get_principal,60/* put_principal */ krb5_ldap_put_principal,61/* delete_principal */ krb5_ldap_delete_principal,62/* rename_principal */ krb5_ldap_rename_principal,63/* iterate */ krb5_ldap_iterate,64/* create_policy */ krb5_ldap_create_password_policy,65/* get_policy */ krb5_ldap_get_password_policy,66/* put_policy */ krb5_ldap_put_password_policy,67/* iter_policy */ krb5_ldap_iterate_password_policy,68/* delete_policy */ krb5_ldap_delete_password_policy,69/* optional functions */70/* fetch_master_key */ NULL /* krb5_ldap_fetch_mkey */,71/* fetch_master_key_list */ NULL,72/* store_master_key_list */ NULL,73/* Search enc type */ NULL,74/* Change pwd */ NULL,75/* promote_db */ NULL,76/* decrypt_key_data */ NULL,77/* encrypt_key_data */ NULL,78/* check_transited_realms */ NULL,79/* check_policy_as */ krb5_ldap_check_policy_as,80/* check_policy_tgs */ NULL,81/* audit_as_req */ krb5_ldap_audit_as_req,82/* refresh_config */ NULL,83/* check_allowed_to_delegate */ krb5_ldap_check_allowed_to_delegate8485};868788