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