mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-22 07:39:35 -05:00
check on escaped rdn separator not needed any more
This commit is contained in:
parent
5fc7217f1b
commit
f74e81aa99
4 changed files with 9 additions and 13 deletions
|
|
@ -379,7 +379,7 @@ acl_get(
|
||||||
if ( dnlen <= patlen )
|
if ( dnlen <= patlen )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if ( !DN_SEPARATOR( e->e_ndn[dnlen - patlen - 1] ) || DN_ESCAPE( e->e_ndn[dnlen - patlen - 2] ) )
|
if ( !DN_SEPARATOR( e->e_ndn[dnlen - patlen - 1] ) )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
rdnlen = dn_rdnlen( NULL, &e->e_nname );
|
rdnlen = dn_rdnlen( NULL, &e->e_nname );
|
||||||
|
|
@ -387,13 +387,13 @@ acl_get(
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
} else if ( a->acl_dn_style == ACL_STYLE_SUBTREE ) {
|
} else if ( a->acl_dn_style == ACL_STYLE_SUBTREE ) {
|
||||||
if ( dnlen > patlen && ( !DN_SEPARATOR( e->e_ndn[dnlen - patlen - 1] ) || DN_ESCAPE( e->e_ndn[dnlen - patlen - 2] ) ) )
|
if ( dnlen > patlen && !DN_SEPARATOR( e->e_ndn[dnlen - patlen - 1] ) )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
} else if ( a->acl_dn_style == ACL_STYLE_CHILDREN ) {
|
} else if ( a->acl_dn_style == ACL_STYLE_CHILDREN ) {
|
||||||
if ( dnlen <= patlen )
|
if ( dnlen <= patlen )
|
||||||
continue;
|
continue;
|
||||||
if ( !DN_SEPARATOR( e->e_ndn[dnlen - patlen - 1] ) || DN_ESCAPE( e->e_ndn[dnlen - patlen - 2] ) )
|
if ( !DN_SEPARATOR( e->e_ndn[dnlen - patlen - 1] ) )
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -581,7 +581,7 @@ acl_mask(
|
||||||
if ( odnlen <= patlen )
|
if ( odnlen <= patlen )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if ( !DN_SEPARATOR( op->o_ndn.bv_val[odnlen - patlen - 1] ) || DN_ESCAPE( op->o_ndn.bv_val[odnlen - patlen - 2] ) )
|
if ( !DN_SEPARATOR( op->o_ndn.bv_val[odnlen - patlen - 1] ) )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
rdnlen = dn_rdnlen( NULL, &op->o_ndn );
|
rdnlen = dn_rdnlen( NULL, &op->o_ndn );
|
||||||
|
|
@ -589,13 +589,13 @@ acl_mask(
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
} else if ( b->a_dn_style == ACL_STYLE_SUBTREE ) {
|
} else if ( b->a_dn_style == ACL_STYLE_SUBTREE ) {
|
||||||
if ( odnlen > patlen && ( !DN_SEPARATOR( op->o_ndn.bv_val[odnlen - patlen - 1] ) || DN_ESCAPE( op->o_ndn.bv_val[odnlen - patlen - 2] ) ) )
|
if ( odnlen > patlen && !DN_SEPARATOR( op->o_ndn.bv_val[odnlen - patlen - 1] ) )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
} else if ( b->a_dn_style == ACL_STYLE_CHILDREN ) {
|
} else if ( b->a_dn_style == ACL_STYLE_CHILDREN ) {
|
||||||
if ( odnlen <= patlen )
|
if ( odnlen <= patlen )
|
||||||
continue;
|
continue;
|
||||||
if ( !DN_SEPARATOR( op->o_ndn.bv_val[odnlen - patlen - 1] ) || DN_ESCAPE( op->o_ndn.bv_val[odnlen - patlen - 2] ) )
|
if ( !DN_SEPARATOR( op->o_ndn.bv_val[odnlen - patlen - 1] ) )
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -784,8 +784,7 @@ is_one_level_rdn(
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
for ( ; from--; ) {
|
for ( ; from--; ) {
|
||||||
if ( DN_SEPARATOR( rdn[ from ] )
|
if ( DN_SEPARATOR( rdn[ from ] ) ) {
|
||||||
&& ! DN_ESCAPE( rdn[ from ] - 1 ) ) {
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -850,8 +850,7 @@ dnIsSuffix(
|
||||||
}
|
}
|
||||||
|
|
||||||
/* no rdn separator or escaped rdn separator */
|
/* no rdn separator or escaped rdn separator */
|
||||||
if ( d > 1 && ( !DN_SEPARATOR( dn->bv_val[ d - 1 ] )
|
if ( d > 1 && !DN_SEPARATOR( dn->bv_val[ d - 1 ] ) ) {
|
||||||
|| DN_ESCAPE( dn->bv_val[ d - 2 ] ) ) ) {
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -68,9 +68,7 @@ get_limits(
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* check for unescaped rdn separator */
|
/* check for unescaped rdn separator */
|
||||||
if ( !DN_SEPARATOR( ndn->bv_val[d-1] )
|
if ( !DN_SEPARATOR( ndn->bv_val[d-1] ) ) {
|
||||||
|| DN_ESCAPE( ndn->bv_val[d-2] ) )
|
|
||||||
{
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue