4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
25 *Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
29 #include <sys/types.h>
36 * Simplified LDAP Naming APIs
41 int (*init_filter_cb)(const ns_ldap_search_desc_t *desc,
42 char **realfilter, const void *userdata),
43 const char * const *attribute,
44 const ns_cred_t *cred,
46 ns_ldap_result_t ** result,
47 ns_ldap_error_t ** errorp,
48 int (*callback)(const ns_ldap_entry_t *entry, const void *userdata),
49 const void *userdata);
51 int __ns_ldap_list_sort(
55 int (*init_filter_cb)(const ns_ldap_search_desc_t *desc,
56 char **realfilter, const void *userdata),
57 const char * const *attribute,
58 const ns_cred_t *cred,
60 ns_ldap_result_t ** result,
61 ns_ldap_error_t ** errorp,
62 int (*callback)(const ns_ldap_entry_t *entry, const void *userdata),
63 const void *userdata);
65 int __ns_ldap_addAttr(
68 const ns_ldap_attr_t * const *attr,
69 const ns_cred_t *cred,
71 ns_ldap_error_t **errorp);
73 int __ns_ldap_delAttr(
76 const ns_ldap_attr_t * const *attr,
77 const ns_cred_t *cred,
79 ns_ldap_error_t **errorp);
81 int __ns_ldap_repAttr(
84 const ns_ldap_attr_t * const *attr,
85 const ns_cred_t *cred,
87 ns_ldap_error_t **errorp);
89 int __ns_ldap_addEntry(
92 const ns_ldap_entry_t *entry,
93 const ns_cred_t *cred,
95 ns_ldap_error_t **errorp);
97 int __ns_ldap_addTypedEntry(
98 const char *servicetype,
102 const ns_cred_t *cred,
104 ns_ldap_error_t **errorp);
106 int __ns_ldap_delEntry(
109 const ns_cred_t *cred,
111 ns_ldap_error_t **errorp);
113 int __ns_ldap_firstEntry(
116 const char *sortattr,
117 int (*init_filter_cb)(const ns_ldap_search_desc_t *desc,
118 char **realfilter, const void *userdata),
119 const char * const *attribute,
120 const ns_cred_t *cred,
123 ns_ldap_result_t ** result,
124 ns_ldap_error_t **errorp,
125 const void *userdata);
127 int __ns_ldap_nextEntry(
129 ns_ldap_result_t ** result,
130 ns_ldap_error_t **errorp);
132 int __ns_ldap_endEntry(
134 ns_ldap_error_t **errorp);
136 int __ns_ldap_freeResult(
137 ns_ldap_result_t **result);
139 int __ns_ldap_freeError(
140 ns_ldap_error_t **errorp);
142 int __ns_ldap_freeCookie(
145 int __ns_ldap_uid2dn(
148 const ns_cred_t *cred,
149 ns_ldap_error_t ** errorp);
151 int __ns_ldap_host2dn(
155 const ns_cred_t *cred,
156 ns_ldap_error_t ** errorp);
158 int __ns_ldap_dn2domain(
161 const ns_cred_t *cred,
162 ns_ldap_error_t **errorp);
165 const ns_cred_t *cred,
167 ns_ldap_error_t **errorp,
168 LDAPControl **serverctrls,
169 LDAPControl **clientctrls);
171 int __ns_ldap_err2str(
175 int __ns_ldap_setParam(
176 const ParamIndexType type,
178 ns_ldap_error_t **errorp);
180 int __ns_ldap_getParam(
181 const ParamIndexType type,
183 ns_ldap_error_t **errorp);
185 int __ns_ldap_freeParam(
188 char **__ns_ldap_getAttr(
189 const ns_ldap_entry_t *entry,
190 const char *attrname);
192 int __s_api_prepend_automountmapname_to_dn(
195 ns_ldap_error_t ** errorp);
197 char *__s_api_get_canonical_name(
198 ns_ldap_entry_t *entry,
199 ns_ldap_attr_t *attrptr,
202 void __ns_ldap_setServer(
205 ns_ldap_error_t *__ns_ldap_LoadConfiguration(
208 ns_ldap_error_t *__ns_ldap_DumpConfiguration(
211 ns_ldap_error_t *__ns_ldap_DumpLdif(
214 ns_ldap_error_t *__ns_ldap_print_config(
217 void __ns_ldap_default_config(
220 int __ns_ldap_download(
224 ns_ldap_error_t **errorp);
226 int __ns_ldap_check_dns_preq(
231 ns_ldap_self_gssapi_config_t config,
232 ns_ldap_error_t **errpp);
234 int __ns_ldap_check_gssapi_preq(
238 ns_ldap_self_gssapi_config_t config,
239 ns_ldap_error_t **errpp);
241 int __ns_ldap_check_all_preq(
245 ns_ldap_self_gssapi_config_t config,
246 ns_ldap_error_t **errpp);