From: Pierangelo Masarati Date: Mon, 25 Nov 2002 18:37:04 +0000 (+0000) Subject: much better fix for ITS#2196 (dnattr without sat_equality is bounced at config) X-Git-Tag: NO_SLAP_OP_BLOCKS~776 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a62aa61544e10be916bc547ab7eab8bb69b80b15;p=openldap much better fix for ITS#2196 (dnattr without sat_equality is bounced at config) --- 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; }