From: Pierangelo Masarati Date: Tue, 20 Apr 2004 14:15:39 +0000 (+0000) Subject: fix acl bug when using dn.one="" X-Git-Tag: OPENDLAP_REL_ENG_2_2_MP~464 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3c5f305a7fb6bd0d59e86258375d51cb72271155;p=openldap fix acl bug when using dn.one="" --- diff --git a/servers/slapd/acl.c b/servers/slapd/acl.c index f9766c2342..418387146a 100644 --- a/servers/slapd/acl.c +++ b/servers/slapd/acl.c @@ -533,16 +533,17 @@ acl_get( continue; } else if ( a->acl_dn_style == ACL_STYLE_ONE ) { - int rdnlen = -1; + int rdnlen = -1, + off = patlen > 0 ? 1 : 0; if ( dnlen <= patlen ) continue; - if ( !DN_SEPARATOR( e->e_ndn[dnlen - patlen - 1] ) ) + if ( patlen > 0 && !DN_SEPARATOR( e->e_ndn[dnlen - patlen - 1] ) ) continue; rdnlen = dn_rdnlen( NULL, &e->e_nname ); - if ( rdnlen != dnlen - patlen - 1 ) + if ( rdnlen != dnlen - patlen - off ) continue; } else if ( a->acl_dn_style == ACL_STYLE_SUBTREE ) {