mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-16 20:06:06 -05:00
fix acl bug when using dn.one=""
This commit is contained in:
parent
02ac6941d3
commit
3c5f305a7f
1 changed files with 4 additions and 3 deletions
|
|
@ -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 ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue