for ( j = 0; backends[i].be_suffix != NULL &&
backends[i].be_suffix[j] != NULL; j++ )
{
-#ifdef LDAP_ALLOW_NULL_SEARCH_BASE
- /* Add greg@greg.rim.or.jp
- * It's quick hack for cheap client
- * Some browser offer a NULL base at ldap_search
- */
- if(dnlen == 0) {
- Debug( LDAP_DEBUG_TRACE,
- "select_backend: use default backend\n", 0, 0, 0 );
- return (&backends[i]);
- }
-#endif /* LDAP_ALLOW_NULL_SEARCH_BASE */
-
len = strlen( backends[i].be_suffix[j] );
if ( len > dnlen ) {
}
}
+#ifdef LDAP_ALLOW_NULL_SEARCH_BASE
+ /* Add greg@greg.rim.or.jp
+ * It's quick hack for cheap client
+ * Some browser offer a NULL base at ldap_search
+ *
+ * Should only be used as a last resort. -Kdz
+ */
+ if(dnlen == 0) {
+ Debug( LDAP_DEBUG_TRACE,
+ "select_backend: use default backend\n", 0, 0, 0 );
+ return( &backends[0] );
+ }
+#endif /* LDAP_ALLOW_NULL_SEARCH_BASE */
return( NULL );
}