From 30f697beeb76f546374898f722700b3784086ae5 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Tue, 20 Apr 2004 14:50:16 +0000 Subject: [PATCH] improve dn.one="" fix --- servers/slapd/acl.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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 ) { -- 2.39.5