#include "back-ldbm.h"
#include "proto-back-ldbm.h"
-extern Attribute *attr_find();
-
int
ldbm_back_compare(
Backend *be,
char *matched;
Entry *e;
Attribute *a;
- int i, rc;
+ int rc;
/* get entry with reader lock */
if ( (e = dn2entry_r( be, dn, &matched )) == NULL ) {
send_ldap_result( conn, op, LDAP_NO_SUCH_OBJECT, matched, "" );
+
+ if(matched == NULL) free(matched);
return( 1 );
}
/* check for deleted */
- if ( ! access_allowed( be, conn, op, e, ava->ava_type, &ava->ava_value,
- op->o_dn, ACL_COMPARE ) ) {
+ if ( ! access_allowed( be, conn, op, e,
+ ava->ava_type, &ava->ava_value, ACL_COMPARE ) )
+ {
send_ldap_result( conn, op, LDAP_INSUFFICIENT_ACCESS, "", "" );
rc = 1;
goto return_results;