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