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 /*
23 * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
24 */
25
26
27 #ifndef _NS_INTERNAL_H
28 #define _NS_INTERNAL_H
29
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33
34 #include <stdio.h>
35 #include <sys/types.h>
36 #include <sys/time.h>
37 #include <thread.h>
38 #include <lber.h>
39 #include <ldap.h>
40 #include "ns_sldap.h"
41 #include "ns_cache_door.h"
42
43 /*
49 #define FALSE 0
50 #define NSLDAPDIRECTORY "/var/ldap"
51 #define NSCONFIGFILE "/var/ldap/ldap_client_file"
52 #define NSCONFIGREFRESH "/var/ldap/ldap_client_file.refresh"
53 #define NSCREDFILE "/var/ldap/ldap_client_cred"
54 #define NSCREDREFRESH "/var/ldap/ldap_client_cred.refresh"
55 #define ROTORSIZE 256
56 #define MASK 0377
57 #define LDAPMAXHARDLOOKUPTIME 256
58 #define DONOTEDIT \
59 "Do not edit this file manually; your changes will be lost." \
60 "Please use ldapclient (1M) instead."
61 #define MAXPORTNUMBER 65535
62 #define MAXPORTNUMBER_STR "65535"
63 #define CREDFILE 0
64 #define CONFIGFILE 1
65 #define UIDNUMFILTER "(&(objectclass=posixAccount)(uidnumber=%s))"
66 #define UIDNUMFILTER_SSD "(&(%%s)(uidnumber=%s))"
67 #define UIDFILTER "(&(objectclass=posixAccount)(uid=%s))"
68 #define UIDFILTER_SSD "(&(%%s)(uid=%s))"
69 #define HOSTFILTER "(&(objectclass=ipHost)(cn=%s))"
70 #define HOSTFILTER_SSD "(&(%%s)(cn=%s))"
71
72 #define SIMPLEPAGECTRLFLAG 1
73 #define VLVCTRLFLAG 2
74
75 #define LISTPAGESIZE 1000
76 #define ENUMPAGESIZE 100
77
78 #define DEFMAX 8
79 #define TOKENSEPARATOR '='
80 #define QUOTETOK '"'
81 #define SPACETOK ' '
82 #define COMMATOK ','
83 #define COLONTOK ':'
84 #define QUESTTOK '?'
85 #define SEMITOK ';'
86 #define TABTOK '\t'
87 #define OPARATOK '('
88 #define CPARATOK ')'
|
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 /*
23 * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
24 * Copyright 2017 Nexenta Systems, Inc. All rights reserved.
25 */
26
27
28 #ifndef _NS_INTERNAL_H
29 #define _NS_INTERNAL_H
30
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34
35 #include <stdio.h>
36 #include <sys/types.h>
37 #include <sys/time.h>
38 #include <thread.h>
39 #include <lber.h>
40 #include <ldap.h>
41 #include "ns_sldap.h"
42 #include "ns_cache_door.h"
43
44 /*
50 #define FALSE 0
51 #define NSLDAPDIRECTORY "/var/ldap"
52 #define NSCONFIGFILE "/var/ldap/ldap_client_file"
53 #define NSCONFIGREFRESH "/var/ldap/ldap_client_file.refresh"
54 #define NSCREDFILE "/var/ldap/ldap_client_cred"
55 #define NSCREDREFRESH "/var/ldap/ldap_client_cred.refresh"
56 #define ROTORSIZE 256
57 #define MASK 0377
58 #define LDAPMAXHARDLOOKUPTIME 256
59 #define DONOTEDIT \
60 "Do not edit this file manually; your changes will be lost." \
61 "Please use ldapclient (1M) instead."
62 #define MAXPORTNUMBER 65535
63 #define MAXPORTNUMBER_STR "65535"
64 #define CREDFILE 0
65 #define CONFIGFILE 1
66 #define UIDNUMFILTER "(&(objectclass=posixAccount)(uidnumber=%s))"
67 #define UIDNUMFILTER_SSD "(&(%%s)(uidnumber=%s))"
68 #define UIDFILTER "(&(objectclass=posixAccount)(uid=%s))"
69 #define UIDFILTER_SSD "(&(%%s)(uid=%s))"
70 #define UIDDNFILTER "(&(objectclass=posixAccount)(distinguishedName=%s))"
71 #define UIDDNFILTER_SSD "(&(%%s)(distinguishedName=%s))"
72
73 #define HOSTFILTER "(&(objectclass=ipHost)(cn=%s))"
74 #define HOSTFILTER_SSD "(&(%%s)(cn=%s))"
75
76 #define SIMPLEPAGECTRLFLAG 1
77 #define VLVCTRLFLAG 2
78
79 #define LISTPAGESIZE 1000
80 #define ENUMPAGESIZE 100
81
82 #define DEFMAX 8
83 #define TOKENSEPARATOR '='
84 #define QUOTETOK '"'
85 #define SPACETOK ' '
86 #define COMMATOK ','
87 #define COLONTOK ':'
88 #define QUESTTOK '?'
89 #define SEMITOK ';'
90 #define TABTOK '\t'
91 #define OPARATOK '('
92 #define CPARATOK ')'
|