{
char *dn, *rdn;
char **title;
- int rc = 0, matches = 0, i, ufn;
+ int rc = 0, matches = 0, i;
struct timeval tv;
LDAPFiltDesc *fd;
LDAPFiltInfo *fi = NULL;
#endif
0 };
- ufn = 0;
-#ifdef FINGER_UFN
- if ( strchr( buf, ',' ) != NULL ) {
- ldap_ufn_setprefix( ld, base );
- tv.tv_sec = FINGER_TIMEOUT;
- tv.tv_usec = 0;
- ldap_ufn_timeout( (void *) &tv );
-
- if ( (rc = ldap_ufn_search_s( ld, buf, attrs, 0, &result ))
- != LDAP_SUCCESS && rc != LDAP_SIZELIMIT_EXCEEDED ) {
- fprintf( stderr, FINGER_UNAVAILABLE );
- ldap_perror( ld, "ldap_search_st" );
- exit( EXIT_FAILURE );
- }
-
- matches = ldap_count_entries( ld, result );
- ufn = 1;
- } else {
-#endif
if ( (fd = ldap_init_getfilter( filterfile ))
== NULL ) {
fprintf( stderr, "Cannot open filter file (%s)\n",
ldap_msgfree( result );
result = NULL;
}
-#ifdef FINGER_UFN
- }
-#endif
if ( rc == LDAP_SIZELIMIT_EXCEEDED ) {
printf( "(Partial results - a size limit was exceeded)\r\n" );
exit( EXIT_FAILURE );
} else if ( matches <= FINGER_LISTLIMIT ) {
printf( "%d %s match%s found for \"%s\":\r\n", matches,
- ufn ? "UFN" : fi->lfi_desc, matches > 1 ? "es" : "", buf );
+ fi->lfi_desc, matches > 1 ? "es" : "", buf );
fflush( stdout );
for ( e = ldap_first_entry( ld, result ); e != NULL; ) {
}
} else {
printf( "%d %s matches for \"%s\":\r\n", matches,
- ufn ? "UFN" : fi->lfi_desc, buf );
+ fi->lfi_desc, buf );
fflush( stdout );
#ifdef FINGER_SORT_ATTR
LDAPMessage *e, *res;
static char *attrs[] = { "title", 0 };
-#ifdef GO500_UFN
- if ( strchr( buf, ',' ) != NULL ) {
- ldap_ufn_setprefix( ld, base );
- tv.tv_sec = GO500_TIMEOUT;
- tv.tv_usec = 0;
- ldap_ufn_timeout( (void *) &tv );
-
- if ( (rc = ldap_ufn_search_s( ld, buf, attrs, 0, &res ))
- != LDAP_SUCCESS && rc != LDAP_SIZELIMIT_EXCEEDED ) {
- fprintf(fp,
- "0An error occurred (explanation)\t@%d\t%s\t%d\r\n",
- rc, myhost, myport );
- return;
- }
-
- matches = ldap_count_entries( ld, res );
- } else {
-#endif
if ( (filtd = ldap_init_getfilter( filterfile )) == NULL ) {
fprintf( stderr, "Cannot open filter file (%s)\n",
filterfile );
break;
}
ldap_getfilter_free( filtd );
-#ifdef GO500_UFN
- }
-#endif
if ( matches <= 0 ) {
return;
*filter++ = '\0';
base = query;
-#ifdef GO500GW_UFN
- if ( strchr( filter, ',' ) != NULL ) {
- ldap_ufn_setprefix( ld, base );
- timeout.tv_sec = GO500GW_TIMEOUT;
- timeout.tv_usec = 0;
- ldap_ufn_timeout( (void *) &timeout );
-
- deref = LDAP_DEREF_FINDING;
- ldap_set_option(ld, LDAP_OPT_DEREF, &deref);
-
- if ( (rc = ldap_ufn_search_s( ld, filter, attrs, 0, &res ))
- != LDAP_SUCCESS && rc != LDAP_SIZELIMIT_EXCEEDED ) {
- fprintf(fp,
- "0An error occurred (explanation)\t@%d\t%s\t%d\r\n",
- rc, myhost, myport );
- return;
- }
-
- count = ldap_count_entries( ld, res );
- } else {
-#endif
if ( (scope = make_scope( ld, base )) == -1 ) {
fprintf( fp, "3Bad scope\r\n" );
exit( EXIT_FAILURE );
deref = LDAP_DEREF_ALWAYS;
ldap_set_option(ld, LDAP_OPT_DEREF, &deref);
ldap_getfilter_free( filtd );
-#ifdef GO500GW_UFN
- }
-#endif
if ( count == 0 ) {
return;
LDAP *ldp;
LDAPMessage *ldmsgp, *entry;
char *dn;
- int matches, rc, ld_errno, ufn;
+ int matches, rc, ld_errno;
LDAPFiltDesc *lfdp;
LDAPFiltInfo *lfi;
struct ldap_disptmpl *tmpllist = NULL;
#endif
NULL };
- ufn = 0;
-
if ( msgp->msg_arg == NULL ) {
return( help_cmd( msgp, reply ));
}
matches = 0;
-#ifdef RCPT500_UFN
- if ( strchr( msgp->msg_arg, ',' ) != NULL ) {
- struct timeval tv;
-
- ldap_ufn_setprefix( ldp, searchbase );
- if (( rc = ldap_ufn_search_s( ldp, msgp->msg_arg, attrs, 0, &ldmsgp ))
- != LDAP_SUCCESS && rc != LDAP_SIZELIMIT_EXCEEDED
- && rc != LDAP_TIMELIMIT_EXCEEDED ) {
- report_ldap_err( ldp, reply );
- close_ldap( ldp );
- ldap_getfilter_free( lfdp );
- return( 0 );
- }
- matches = ldap_count_entries( ldp, ldmsgp );
- ufn = 1;
- } else {
-#endif /* RCPT500_UFN */
-
for ( lfi = ldap_getfirstfilter( lfdp, "rcpt500", msgp->msg_arg );
lfi != NULL; lfi = ldap_getnextfilter( lfdp )) {
rc = ldap_search_s( ldp, searchbase, LDAP_SCOPE_SUBTREE,
ldap_msgfree( ldmsgp );
}
}
-#ifdef RCPT500_UFN
- }
-#endif /* RCPT500_UFN */
if ( matches == 0 ) {
sprintf( buf, "No matches were found for '%s'\n", msgp->msg_arg );
if ( matches <= RCPT500_LISTLIMIT ) {
sprintf( buf, "%d %s match%s found for '%s':\n\n", matches,
- ufn ? "UFN" : lfi->lfi_desc,
+ lfi->lfi_desc,
( matches > 1 ) ? "es" : "", msgp->msg_arg );
strcat( reply, buf );
} else {
sprintf( buf, "%d %s matches were found for '%s':\n",
- matches, ufn ? "UFN" : lfi->lfi_desc, msgp->msg_arg );
+ matches, lfi->lfi_desc, msgp->msg_arg );
strcat( reply, buf );
append_entry_list( reply, msgp->msg_arg, ldp, ldmsgp );
ldap_msgfree( ldmsgp );
break;
}
- /*
- * It wasn't a UFN, so look it up in the usual method.
- */
for (fi = ldap_getfirstfilter(lfdp, "ud", who); fi != NULL;
fi = ldap_getnextfilter(lfdp)) {
#ifdef DEBUG
* If the attribute which we are gathering is a "owner"
* then we should lookup the name. The user is going to
* either have to change the search base before doing the
- * modify, or the person is going to have to be within the
- * scope of the current search base, or they will need to
- * type in a UFN.
+ * modify or the person is going to have to be within the
+ * scope of the current search base.
*/
if (!strcmp(id, "owner")) {
LDAPMessage *lmp, *elmp;