From: Pierangelo Masarati Date: Tue, 20 Apr 2004 14:50:16 +0000 (+0000) Subject: improve dn.one="" fix X-Git-Tag: OPENDLAP_REL_ENG_2_2_MP~462 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=30f697beeb76f546374898f722700b3784086ae5;p=openldap improve dn.one="" fix --- diff --git a/servers/slapd/acl.c b/servers/slapd/acl.c index a9db8c393b..fcb2ffb437 100644 --- a/servers/slapd/acl.c +++ b/servers/slapd/acl.c @@ -541,17 +541,19 @@ acl_get( continue; } else if ( a->acl_dn_style == ACL_STYLE_ONE ) { - int rdnlen = -1, - off = patlen > 0 ? 1 : 0; + int rdnlen = -1, sep = 0; if ( dnlen <= patlen ) continue; - if ( patlen > 0 && !DN_SEPARATOR( e->e_ndn[dnlen - patlen - 1] ) ) - continue; + if ( patlen > 0 ) { + if ( !DN_SEPARATOR( e->e_ndn[dnlen - patlen - 1] ) ) + continue; + sep = 1; + } rdnlen = dn_rdnlen( NULL, &e->e_nname ); - if ( rdnlen != dnlen - patlen - off ) + if ( rdnlen != dnlen - patlen - sep ) continue; } else if ( a->acl_dn_style == ACL_STYLE_SUBTREE ) {