diff --git a/clients/fax500/rp500.c b/clients/fax500/rp500.c index 9ac3b3f8ff..058091d410 100644 --- a/clients/fax500/rp500.c +++ b/clients/fax500/rp500.c @@ -129,6 +129,7 @@ main( int argc, char **argv ) } result = NULL; +#ifdef LDAP_UFN if ( strchr( key, ',' ) != NULL ) { int ld_deref = LDAP_DEREF_FINDING; ldap_set_option(ld, LDAP_OPT_DEREF, &ld_deref); @@ -140,7 +141,9 @@ main( int argc, char **argv ) exit( -1 ); } matches = ldap_count_entries( ld, result ); - } else { + } else +#endif + { for ( fi = ldap_getfirstfilter( filtd, "rp500", key ); fi != NULL; fi = ldap_getnextfilter( filtd ) ) { if ( (rc = ldap_search_s( ld, base, LDAP_SCOPE_SUBTREE, diff --git a/include/ldap_defaults.h b/include/ldap_defaults.h index 811865f1d1..b7d7321251 100644 --- a/include/ldap_defaults.h +++ b/include/ldap_defaults.h @@ -81,8 +81,10 @@ Please try again later.\r\n" #define FINGER_DEREF LDAP_DEREF_FINDING /* attribute to use when sorting results */ #define FINGER_SORT_ATTR SORT_ATTR +#ifdef LDAP_UFN /* enable ufn support */ #define FINGER_UFN +#endif /* timeout for searches */ #define FINGER_TIMEOUT 60 /* number of DN components to show in entry displays */ @@ -99,8 +101,10 @@ Please try again later.\r\n" #define GO500_SORT_ATTR SORT_ATTR /* timeout for searches */ #define GO500_TIMEOUT 180 +#ifdef LDAP_UFN /* enable ufn support */ #define GO500_UFN +#endif /* * only set and uncomment this if your hostname() does not return * a fully qualified hostname @@ -118,8 +122,10 @@ Please try again later.\r\n" #define GO500GW_PORT 7777 /* timeout on all searches */ #define GO500GW_TIMEOUT 180 +#ifdef LDAP_UFN /* enable ufn support */ #define GO500GW_UFN +#endif /* attribute to use when sorting results */ #define GO500GW_SORT_ATTR SORT_ATTR /* @@ -146,8 +152,10 @@ Please try again later.\r\n" #define RCPT500_SORT_ATTR SORT_ATTR /* max number of hits displayed in full before a list is presented */ #define RCPT500_LISTLIMIT 1 +#ifdef LDAP_UFN /* enable ufn support */ #define RCPT500_UFN +#endif /* number of DN components to show in entry displays */ #define RCPT500_RDNCOUNT DEFAULT_RDNCOUNT diff --git a/libraries/libldap/getattr.c b/libraries/libldap/getattr.c index d2a478c634..ae645534fb 100644 --- a/libraries/libldap/getattr.c +++ b/libraries/libldap/getattr.c @@ -58,13 +58,13 @@ ldap_first_attribute( LDAP *ld, LDAPMessage *entry, BerElement **berout ) return NULL; } -#if 0 +#if LDAP_SEQORSET_BAILOUT if( len == 0 ) { return NULL; } #endif -#if 0 +#if LBER_SEQORSET_AVOID_OVERRUN /* set the length to avoid overrun */ rc = ber_set_option( ber, LBER_OPT_REMAINING_BYTES, &len ); if( rc != LBER_OPT_SUCCESS ) { @@ -100,7 +100,7 @@ ldap_next_attribute( LDAP *ld, LDAPMessage *entry, BerElement *ber ) assert( entry != NULL ); assert( ber != NULL ); -#if 0 +#if LDAP_SEQORSET_BAILOUT if ( ber_pvt_ber_remaining( ber ) == 0 ) { return NULL; }