2 * Copyright (c) 1998 Sendmail, Inc. All rights reserved.
4 * By using this file, you agree to the terms and conditions set
5 * forth in the LICENSE file which can be found at the top level of
6 * the sendmail distribution.
13 ** Contributed by Booker C. Bense <bbense+ldap@stanford.edu>.
14 ** Please go to him for support -- since I (Eric) don't run LDAP, I
15 ** can't help you at all.
17 ** @(#)ldap_map.h 8.12 (Berkeley) 2/2/1999
25 struct ldap_map_struct
27 /* needed for ldap_open */
31 /* Options set in ld struct before ldap_bind_s */
37 /* args for ldap_bind_s */
43 /* args for ldap_search_st */
49 struct timeval timeout;
53 typedef struct ldap_map_struct LDAP_MAP_STRUCT;
55 #define DEFAULT_LDAP_MAP_PORT LDAP_PORT
56 #define DEFAULT_LDAP_MAP_SCOPE LDAP_SCOPE_SUBTREE
57 #define DEFAULT_LDAP_MAP_BINDDN NULL
58 #define DEFAULT_LDAP_MAP_PASSWD NULL
59 #define DEFAULT_LDAP_MAP_METHOD LDAP_AUTH_SIMPLE
60 #define DEFAULT_LDAP_MAP_TIMELIMIT 5
61 #define DEFAULT_LDAP_MAP_DEREF LDAP_DEREF_NEVER
62 #define DEFAULT_LDAP_MAP_SIZELIMIT 0
63 #define DEFAULT_LDAP_MAP_ATTRSONLY 0
64 #define LDAP_MAP_MAX_FILTER 1024
66 # define DEFAULT_LDAP_MAP_LDAP_OPTIONS LDAP_OPT_REFERRALS
67 #else /* LDAP_REFERRALS */
68 # define DEFAULT_LDAP_MAP_LDAP_OPTIONS 0
69 #endif /* LDAP_REFERRALS */
72 ** ldap_init(3) is broken in Umich 3.x and OpenLDAP 1.0/1.1.
73 ** Use the lack of LDAP_OPT_SIZELIMIT to detect old API implementations
74 ** and assume (falsely) that all old API implementations are broken.
75 ** (OpenLDAP 1.2 and later have a working ldap_init(), add -DUSE_LDAP_INIT)
78 #if defined(LDAP_OPT_SIZELIMIT) && !defined(USE_LDAP_INIT)
79 # define USE_LDAP_INIT 1
83 ** LDAP_OPT_SIZELIMIT is not defined under Umich 3.x nor OpenLDAP 1.x,
84 ** hence ldap_set_option() must not exist.
87 #if defined(LDAP_OPT_SIZELIMIT) && !defined(USE_LDAP_SET_OPTION)
88 # define USE_LDAP_SET_OPTION 1
91 #endif /* _LDAP_MAP_H */