From a62aa61544e10be916bc547ab7eab8bb69b80b15 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Mon, 25 Nov 2002 18:37:04 +0000 Subject: [PATCH] much better fix for ITS#2196 (dnattr without sat_equality is bounced at config) --- servers/slapd/aclparse.c | 9 +++++++++ servers/slapd/value.c | 7 +++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/servers/slapd/aclparse.c b/servers/slapd/aclparse.c index 80ffa377bf..d420a0b4c7 100644 --- a/servers/slapd/aclparse.c +++ b/servers/slapd/aclparse.c @@ -464,6 +464,15 @@ parse_acl( acl_usage(); } + if( b->a_dn_at->ad_type->sat_equality == NULL ) + { + fprintf( stderr, + "%s: line %d: dnattr \"%s\": " + "inappropriate matching (no EQUALITY)\n", + fname, lineno, right ); + acl_usage(); + } + continue; } diff --git a/servers/slapd/value.c b/servers/slapd/value.c index 9ed1ad969f..a232d066e9 100644 --- a/servers/slapd/value.c +++ b/servers/slapd/value.c @@ -324,10 +324,9 @@ value_match( struct berval nv1 = { 0, NULL }; struct berval nv2 = { 0, NULL }; - /* - * FIXME: mr should NOT be NULL ... - */ - if( !mr || !mr->smr_match ) { + assert( mr != NULL ); + + if( !mr->smr_match ) { return LDAP_INAPPROPRIATE_MATCHING; } -- 2.39.5