Fix #undef LDAP_UFN

This commit is contained in:
Kurt Zeilenga 2000-09-16 06:24:17 +00:00
parent b2e776cfe7
commit f42966f9e1
3 changed files with 15 additions and 4 deletions

View file

@ -129,6 +129,7 @@ main( int argc, char **argv )
} }
result = NULL; result = NULL;
#ifdef LDAP_UFN
if ( strchr( key, ',' ) != NULL ) { if ( strchr( key, ',' ) != NULL ) {
int ld_deref = LDAP_DEREF_FINDING; int ld_deref = LDAP_DEREF_FINDING;
ldap_set_option(ld, LDAP_OPT_DEREF, &ld_deref); ldap_set_option(ld, LDAP_OPT_DEREF, &ld_deref);
@ -140,7 +141,9 @@ main( int argc, char **argv )
exit( -1 ); exit( -1 );
} }
matches = ldap_count_entries( ld, result ); matches = ldap_count_entries( ld, result );
} else { } else
#endif
{
for ( fi = ldap_getfirstfilter( filtd, "rp500", key ); for ( fi = ldap_getfirstfilter( filtd, "rp500", key );
fi != NULL; fi = ldap_getnextfilter( filtd ) ) { fi != NULL; fi = ldap_getnextfilter( filtd ) ) {
if ( (rc = ldap_search_s( ld, base, LDAP_SCOPE_SUBTREE, if ( (rc = ldap_search_s( ld, base, LDAP_SCOPE_SUBTREE,

View file

@ -81,8 +81,10 @@ Please try again later.\r\n"
#define FINGER_DEREF LDAP_DEREF_FINDING #define FINGER_DEREF LDAP_DEREF_FINDING
/* attribute to use when sorting results */ /* attribute to use when sorting results */
#define FINGER_SORT_ATTR SORT_ATTR #define FINGER_SORT_ATTR SORT_ATTR
#ifdef LDAP_UFN
/* enable ufn support */ /* enable ufn support */
#define FINGER_UFN #define FINGER_UFN
#endif
/* timeout for searches */ /* timeout for searches */
#define FINGER_TIMEOUT 60 #define FINGER_TIMEOUT 60
/* number of DN components to show in entry displays */ /* 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 #define GO500_SORT_ATTR SORT_ATTR
/* timeout for searches */ /* timeout for searches */
#define GO500_TIMEOUT 180 #define GO500_TIMEOUT 180
#ifdef LDAP_UFN
/* enable ufn support */ /* enable ufn support */
#define GO500_UFN #define GO500_UFN
#endif
/* /*
* only set and uncomment this if your hostname() does not return * only set and uncomment this if your hostname() does not return
* a fully qualified hostname * a fully qualified hostname
@ -118,8 +122,10 @@ Please try again later.\r\n"
#define GO500GW_PORT 7777 #define GO500GW_PORT 7777
/* timeout on all searches */ /* timeout on all searches */
#define GO500GW_TIMEOUT 180 #define GO500GW_TIMEOUT 180
#ifdef LDAP_UFN
/* enable ufn support */ /* enable ufn support */
#define GO500GW_UFN #define GO500GW_UFN
#endif
/* attribute to use when sorting results */ /* attribute to use when sorting results */
#define GO500GW_SORT_ATTR SORT_ATTR #define GO500GW_SORT_ATTR SORT_ATTR
/* /*
@ -146,8 +152,10 @@ Please try again later.\r\n"
#define RCPT500_SORT_ATTR SORT_ATTR #define RCPT500_SORT_ATTR SORT_ATTR
/* max number of hits displayed in full before a list is presented */ /* max number of hits displayed in full before a list is presented */
#define RCPT500_LISTLIMIT 1 #define RCPT500_LISTLIMIT 1
#ifdef LDAP_UFN
/* enable ufn support */ /* enable ufn support */
#define RCPT500_UFN #define RCPT500_UFN
#endif
/* number of DN components to show in entry displays */ /* number of DN components to show in entry displays */
#define RCPT500_RDNCOUNT DEFAULT_RDNCOUNT #define RCPT500_RDNCOUNT DEFAULT_RDNCOUNT

View file

@ -58,13 +58,13 @@ ldap_first_attribute( LDAP *ld, LDAPMessage *entry, BerElement **berout )
return NULL; return NULL;
} }
#if 0 #if LDAP_SEQORSET_BAILOUT
if( len == 0 ) { if( len == 0 ) {
return NULL; return NULL;
} }
#endif #endif
#if 0 #if LBER_SEQORSET_AVOID_OVERRUN
/* set the length to avoid overrun */ /* set the length to avoid overrun */
rc = ber_set_option( ber, LBER_OPT_REMAINING_BYTES, &len ); rc = ber_set_option( ber, LBER_OPT_REMAINING_BYTES, &len );
if( rc != LBER_OPT_SUCCESS ) { if( rc != LBER_OPT_SUCCESS ) {
@ -100,7 +100,7 @@ ldap_next_attribute( LDAP *ld, LDAPMessage *entry, BerElement *ber )
assert( entry != NULL ); assert( entry != NULL );
assert( ber != NULL ); assert( ber != NULL );
#if 0 #if LDAP_SEQORSET_BAILOUT
if ( ber_pvt_ber_remaining( ber ) == 0 ) { if ( ber_pvt_ber_remaining( ber ) == 0 ) {
return NULL; return NULL;
} }