diff options
Diffstat (limited to 'src/ldap_map.h')
| -rw-r--r-- | src/ldap_map.h | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/src/ldap_map.h b/src/ldap_map.h index dd85da3..7d40329 100644 --- a/src/ldap_map.h +++ b/src/ldap_map.h @@ -1,11 +1,20 @@ /* + * Copyright (c) 1998 Sendmail, Inc. All rights reserved. + * + * By using this file, you agree to the terms and conditions set + * forth in the LICENSE file which can be found at the top level of + * the sendmail distribution. + * + */ + +/* ** Support for LDAP. ** -** Contributed by Booker C. Bense <bbense@networking.stanford.edu>. +** Contributed by Booker C. Bense <bbense+ldap@stanford.edu>. ** Please go to him for support -- since I (Eric) don't run LDAP, I ** can't help you at all. ** -** @(#)ldap_map.h 8.4 (Berkeley) 6/3/97 +** @(#)ldap_map.h 8.12 (Berkeley) 2/2/1999 */ #ifndef _LDAP_MAP_H @@ -52,11 +61,31 @@ typedef struct ldap_map_struct LDAP_MAP_STRUCT; #define DEFAULT_LDAP_MAP_DEREF LDAP_DEREF_NEVER #define DEFAULT_LDAP_MAP_SIZELIMIT 0 #define DEFAULT_LDAP_MAP_ATTRSONLY 0 -#define LDAP_MAP_MAX_FILTER 256 +#define LDAP_MAP_MAX_FILTER 1024 #ifdef LDAP_REFERRALS # define DEFAULT_LDAP_MAP_LDAP_OPTIONS LDAP_OPT_REFERRALS #else /* LDAP_REFERRALS */ # define DEFAULT_LDAP_MAP_LDAP_OPTIONS 0 #endif /* LDAP_REFERRALS */ +/* +** ldap_init(3) is broken in Umich 3.x and OpenLDAP 1.0/1.1. +** Use the lack of LDAP_OPT_SIZELIMIT to detect old API implementations +** and assume (falsely) that all old API implementations are broken. +** (OpenLDAP 1.2 and later have a working ldap_init(), add -DUSE_LDAP_INIT) +*/ + +#if defined(LDAP_OPT_SIZELIMIT) && !defined(USE_LDAP_INIT) +# define USE_LDAP_INIT 1 +#endif + +/* +** LDAP_OPT_SIZELIMIT is not defined under Umich 3.x nor OpenLDAP 1.x, +** hence ldap_set_option() must not exist. +*/ + +#if defined(LDAP_OPT_SIZELIMIT) && !defined(USE_LDAP_SET_OPTION) +# define USE_LDAP_SET_OPTION 1 +#endif + #endif /* _LDAP_MAP_H */ |
