3 *
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.
7 *
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.
12 *
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]
18 *
19 * CDDL HEADER END
20 */
21 /*
22 * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
23 */
24
25
26 #ifndef _NS_SLDAP_H
27 #define _NS_SLDAP_H
28
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32
33 #include <stdio.h>
34 #include <sys/types.h>
35 #include <lber.h>
36 #include <ldap.h>
37
38 /*
39 * Version
40 */
41 #define NS_LDAP_VERSION NS_LDAP_VERSION_2
42 #define NS_LDAP_VERSION_1 "1.0"
796 int __ns_ldap_nextEntry(
797 void *cookie,
798 ns_ldap_result_t ** result,
799 ns_ldap_error_t **errorp);
800
801 int __ns_ldap_endEntry(
802 void **cookie,
803 ns_ldap_error_t **errorp);
804
805 int __ns_ldap_freeResult(
806 ns_ldap_result_t **result);
807
808 int __ns_ldap_freeError(
809 ns_ldap_error_t **errorp);
810
811 int __ns_ldap_uid2dn(
812 const char *uid,
813 char **userDN,
814 const ns_cred_t *cred,
815 ns_ldap_error_t ** errorp);
816
817 int __ns_ldap_host2dn(
818 const char *host,
819 const char *domain,
820 char **hostDN,
821 const ns_cred_t *cred,
822 ns_ldap_error_t ** errorp);
823
824 int __ns_ldap_dn2domain(
825 const char *dn,
826 char **domain,
827 const ns_cred_t *cred,
828 ns_ldap_error_t ** errorp);
829
830 int __ns_ldap_auth(
831 const ns_cred_t *cred,
832 const int flag,
833 ns_ldap_error_t **errorp,
834 LDAPControl **serverctrls,
835 LDAPControl **clientctrls);
|
3 *
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.
7 *
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.
12 *
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]
18 *
19 * CDDL HEADER END
20 */
21 /*
22 * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
23 * Copyright 2017 Nexenta Systems, Inc. All rights reserved.
24 */
25
26
27 #ifndef _NS_SLDAP_H
28 #define _NS_SLDAP_H
29
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33
34 #include <stdio.h>
35 #include <sys/types.h>
36 #include <lber.h>
37 #include <ldap.h>
38
39 /*
40 * Version
41 */
42 #define NS_LDAP_VERSION NS_LDAP_VERSION_2
43 #define NS_LDAP_VERSION_1 "1.0"
797 int __ns_ldap_nextEntry(
798 void *cookie,
799 ns_ldap_result_t ** result,
800 ns_ldap_error_t **errorp);
801
802 int __ns_ldap_endEntry(
803 void **cookie,
804 ns_ldap_error_t **errorp);
805
806 int __ns_ldap_freeResult(
807 ns_ldap_result_t **result);
808
809 int __ns_ldap_freeError(
810 ns_ldap_error_t **errorp);
811
812 int __ns_ldap_uid2dn(
813 const char *uid,
814 char **userDN,
815 const ns_cred_t *cred,
816 ns_ldap_error_t ** errorp);
817
818 int __ns_ldap_dn2uid(
819 const char *dn,
820 char **userID,
821 const ns_cred_t *cred,
822 ns_ldap_error_t ** errorp);
823
824 int __ns_ldap_host2dn(
825 const char *host,
826 const char *domain,
827 char **hostDN,
828 const ns_cred_t *cred,
829 ns_ldap_error_t ** errorp);
830
831 int __ns_ldap_dn2domain(
832 const char *dn,
833 char **domain,
834 const ns_cred_t *cred,
835 ns_ldap_error_t ** errorp);
836
837 int __ns_ldap_auth(
838 const ns_cred_t *cred,
839 const int flag,
840 ns_ldap_error_t **errorp,
841 LDAPControl **serverctrls,
842 LDAPControl **clientctrls);
|