mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-09 02:52:04 +08:00
Check for DN separator
This commit is contained in:
parent
d7ccad3839
commit
c5d24232a4
@ -442,12 +442,16 @@ select_backend(
|
||||
len = strlen( backends[i].be_nsuffix[j] );
|
||||
|
||||
if ( len > dnlen ) {
|
||||
/* suffix is longer than DN */
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( strcmp( backends[i].be_nsuffix[j],
|
||||
dn + (dnlen - len) ) == 0 )
|
||||
{
|
||||
if ( len < dnlen && DN_SEPARATOR( dn[(dnlen-len)-1] ) ) {
|
||||
/* make sure we have a separator */
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( strcmp( backends[i].be_nsuffix[j], &dn[dnlen-len] ) == 0 ) {
|
||||
if( be == NULL ) {
|
||||
be = &backends[i];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user