mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-11 09:22:54 -05:00
allow empty suffix
This commit is contained in:
parent
4e79e82972
commit
cea4556910
1 changed files with 11 additions and 0 deletions
|
|
@ -458,6 +458,14 @@ dn_issuffixbv(
|
|||
{
|
||||
int d = dn->bv_len - suffix->bv_len;
|
||||
|
||||
assert( dn );
|
||||
assert( suffix );
|
||||
|
||||
/* empty suffix matches any dn */
|
||||
if ( suffix->bv_len == 0 ) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* suffix longer than dn */
|
||||
if ( d < 0 ) {
|
||||
return 0;
|
||||
|
|
@ -491,6 +499,9 @@ dn_issuffix(
|
|||
{
|
||||
struct berval bvdn, bvsuffix;
|
||||
|
||||
assert( dn );
|
||||
assert( suffix );
|
||||
|
||||
bvdn.bv_val = (char *) dn;
|
||||
bvdn.bv_len = strlen( dn );
|
||||
bvsuffix.bv_val = (char *) suffix;
|
||||
|
|
|
|||
Loading…
Reference in a new issue