Blame src/plugins/kdb/ldap/ldap_exp.c

Packit fd8b60
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
Packit fd8b60
/* plugins/kdb/ldap/ldap_exp.c */
Packit fd8b60
/*
Packit fd8b60
 * Copyright (c) 2004-2005, Novell, Inc.
Packit fd8b60
 * All rights reserved.
Packit fd8b60
 *
Packit fd8b60
 * Redistribution and use in source and binary forms, with or without
Packit fd8b60
 * modification, are permitted provided that the following conditions are met:
Packit fd8b60
 *
Packit fd8b60
 *   * Redistributions of source code must retain the above copyright notice,
Packit fd8b60
 *       this list of conditions and the following disclaimer.
Packit fd8b60
 *   * Redistributions in binary form must reproduce the above copyright
Packit fd8b60
 *       notice, this list of conditions and the following disclaimer in the
Packit fd8b60
 *       documentation and/or other materials provided with the distribution.
Packit fd8b60
 *   * The copyright holder's name is not used to endorse or promote products
Packit fd8b60
 *       derived from this software without specific prior written permission.
Packit fd8b60
 *
Packit fd8b60
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
Packit fd8b60
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Packit fd8b60
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
Packit fd8b60
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
Packit fd8b60
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
Packit fd8b60
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
Packit fd8b60
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
Packit fd8b60
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
Packit fd8b60
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
Packit fd8b60
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
Packit fd8b60
 * POSSIBILITY OF SUCH DAMAGE.
Packit fd8b60
 */
Packit fd8b60
Packit fd8b60
#include "k5-int.h"
Packit fd8b60
#if HAVE_UNISTD_H
Packit fd8b60
#include <unistd.h>
Packit fd8b60
#endif
Packit fd8b60
#include <stdio.h>
Packit fd8b60
#include <errno.h>
Packit fd8b60
#include <utime.h>
Packit fd8b60
#include <kdb5.h>
Packit fd8b60
#include "kdb_ldap.h"
Packit fd8b60
#include "ldap_principal.h"
Packit fd8b60
#include "ldap_pwd_policy.h"
Packit fd8b60
Packit fd8b60
Packit fd8b60
/*
Packit fd8b60
 *      Exposed API
Packit fd8b60
 */
Packit fd8b60
Packit fd8b60
kdb_vftabl PLUGIN_SYMBOL_NAME(krb5_ldap, kdb_function_table) = {
Packit fd8b60
    KRB5_KDB_DAL_MAJOR_VERSION,             /* major version number */
Packit fd8b60
    0,                                      /* minor version number 0 */
Packit fd8b60
    /* init_library */                      krb5_ldap_lib_init,
Packit fd8b60
    /* fini_library */                      krb5_ldap_lib_cleanup,
Packit fd8b60
    /* init_module */                       krb5_ldap_open,
Packit fd8b60
    /* fini_module */                       krb5_ldap_close,
Packit fd8b60
    /* create */                            krb5_ldap_create,
Packit fd8b60
    /* destroy */                           krb5_ldap_delete_realm_1,
Packit fd8b60
    /* get_age */                           krb5_ldap_get_age,
Packit fd8b60
    /* lock */                              krb5_ldap_lock,
Packit fd8b60
    /* unlock */                            krb5_ldap_unlock,
Packit fd8b60
    /* get_principal */                     krb5_ldap_get_principal,
Packit fd8b60
    /* put_principal */                     krb5_ldap_put_principal,
Packit fd8b60
    /* delete_principal */                  krb5_ldap_delete_principal,
Packit fd8b60
    /* rename_principal */                  krb5_ldap_rename_principal,
Packit fd8b60
    /* iterate */                           krb5_ldap_iterate,
Packit fd8b60
    /* create_policy */                     krb5_ldap_create_password_policy,
Packit fd8b60
    /* get_policy */                        krb5_ldap_get_password_policy,
Packit fd8b60
    /* put_policy */                        krb5_ldap_put_password_policy,
Packit fd8b60
    /* iter_policy */                       krb5_ldap_iterate_password_policy,
Packit fd8b60
    /* delete_policy */                     krb5_ldap_delete_password_policy,
Packit fd8b60
    /* optional functions */
Packit fd8b60
    /* fetch_master_key */                  NULL /* krb5_ldap_fetch_mkey */,
Packit fd8b60
    /* fetch_master_key_list */             NULL,
Packit fd8b60
    /* store_master_key_list */             NULL,
Packit fd8b60
    /* Search enc type */                   NULL,
Packit fd8b60
    /* Change pwd   */                      NULL,
Packit fd8b60
    /* promote_db */                        NULL,
Packit fd8b60
    /* decrypt_key_data */                  NULL,
Packit fd8b60
    /* encrypt_key_data */                  NULL,
Packit fd8b60
    /* sign_authdata */                     NULL,
Packit fd8b60
    /* check_transited_realms */            NULL,
Packit fd8b60
    /* check_policy_as */                   krb5_ldap_check_policy_as,
Packit fd8b60
    /* check_policy_tgs */                  NULL,
Packit fd8b60
    /* audit_as_req */                      krb5_ldap_audit_as_req,
Packit fd8b60
    /* refresh_config */                    NULL,
Packit fd8b60
    /* check_allowed_to_delegate */         krb5_ldap_check_allowed_to_delegate
Packit fd8b60
Packit fd8b60
};