Commit cea45569 authored by Pierangelo Masarati's avatar Pierangelo Masarati
Browse files

allow empty suffix

parent 4e79e829
......@@ -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;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment