From f74e81aa9973162cc455d48c6f9eb348a85a824f Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Tue, 22 Jan 2002 08:30:32 +0000 Subject: [PATCH] check on escaped rdn separator not needed any more --- servers/slapd/acl.c | 12 ++++++------ servers/slapd/back-meta/search.c | 3 +-- servers/slapd/dn.c | 3 +-- servers/slapd/limits.c | 4 +--- 4 files changed, 9 insertions(+), 13 deletions(-) diff --git a/servers/slapd/acl.c b/servers/slapd/acl.c index 0b78173e19..6feaa84a49 100644 --- a/servers/slapd/acl.c +++ b/servers/slapd/acl.c @@ -379,7 +379,7 @@ acl_get( if ( dnlen <= patlen ) 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; rdnlen = dn_rdnlen( NULL, &e->e_nname ); @@ -387,13 +387,13 @@ acl_get( continue; } 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; } else if ( a->acl_dn_style == ACL_STYLE_CHILDREN ) { if ( dnlen <= patlen ) 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; } @@ -581,7 +581,7 @@ acl_mask( if ( odnlen <= patlen ) 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; rdnlen = dn_rdnlen( NULL, &op->o_ndn ); @@ -589,13 +589,13 @@ acl_mask( continue; } 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; } else if ( b->a_dn_style == ACL_STYLE_CHILDREN ) { if ( odnlen <= patlen ) 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; } diff --git a/servers/slapd/back-meta/search.c b/servers/slapd/back-meta/search.c index 8ad4d3c6b8..2ea04998d7 100644 --- a/servers/slapd/back-meta/search.c +++ b/servers/slapd/back-meta/search.c @@ -784,8 +784,7 @@ is_one_level_rdn( ) { for ( ; from--; ) { - if ( DN_SEPARATOR( rdn[ from ] ) - && ! DN_ESCAPE( rdn[ from ] - 1 ) ) { + if ( DN_SEPARATOR( rdn[ from ] ) ) { return 0; } } diff --git a/servers/slapd/dn.c b/servers/slapd/dn.c index 532b38c7d8..1c6ad8fc49 100644 --- a/servers/slapd/dn.c +++ b/servers/slapd/dn.c @@ -850,8 +850,7 @@ dnIsSuffix( } /* no rdn separator or escaped rdn separator */ - if ( d > 1 && ( !DN_SEPARATOR( dn->bv_val[ d - 1 ] ) - || DN_ESCAPE( dn->bv_val[ d - 2 ] ) ) ) { + if ( d > 1 && !DN_SEPARATOR( dn->bv_val[ d - 1 ] ) ) { return 0; } diff --git a/servers/slapd/limits.c b/servers/slapd/limits.c index 2cddf4166b..d9088ca8ac 100644 --- a/servers/slapd/limits.c +++ b/servers/slapd/limits.c @@ -68,9 +68,7 @@ get_limits( } } else { /* check for unescaped rdn separator */ - if ( !DN_SEPARATOR( ndn->bv_val[d-1] ) - || DN_ESCAPE( ndn->bv_val[d-2] ) ) - { + if ( !DN_SEPARATOR( ndn->bv_val[d-1] ) ) { break; } } -- 2.39.5