mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-15 03:01:09 +08:00
Added greg@greg.rim.or.jp's quick hack to allow search with empty search base.
Must enable -DLDAP_ALLOW_NULL_SEARCH_BASE to use.
This commit is contained in:
parent
c1b676a13e
commit
95b24ea482
@ -159,7 +159,20 @@ select_backend( char * dn )
|
||||
dnlen = strlen( dn );
|
||||
for ( i = 0; i < nbackends; i++ ) {
|
||||
for ( j = 0; backends[i].be_suffix != NULL &&
|
||||
backends[i].be_suffix[j] != NULL; j++ ) {
|
||||
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 ) {
|
||||
|
Loading…
Reference in New Issue
Block a user