]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-monitor/compare.c
coverity scan, fix typo
[openldap] / servers / slapd / back-monitor / compare.c
index 7c1134e5abfd9079929285c2079ece42f68956f2..3a8df66624c29f16ea9093b82eaa169708566282 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 2001-2005 The OpenLDAP Foundation.
+ * Copyright 2001-2007 The OpenLDAP Foundation.
  * Portions Copyright 2001-2003 Pierangelo Masarati.
  * All rights reserved.
  *
@@ -27,7 +27,7 @@
 #include "back-monitor.h"
 
 int
-monitor_back_compare( struct slap_op *op, struct slap_rep *rs)
+monitor_back_compare( Operation *op, SlapReply *rs )
 {
        monitor_info_t  *mi = ( monitor_info_t * ) op->o_bd->be_private;
        Entry           *e, *matched = NULL;
@@ -35,19 +35,16 @@ monitor_back_compare( struct slap_op *op, struct slap_rep *rs)
        int             rc;
 
        /* get entry with reader lock */
-       monitor_cache_dn2entry( op, &op->o_req_ndn, &e, &matched );
+       monitor_cache_dn2entry( op, rs, &op->o_req_ndn, &e, &matched );
        if ( e == NULL ) {
                rs->sr_err = LDAP_NO_SUCH_OBJECT;
                if ( matched ) {
-#ifdef SLAP_ACL_HONOR_DISCLOSE
                        if ( !access_allowed_mask( op, matched,
                                        slap_schema.si_ad_entry,
                                        NULL, ACL_DISCLOSE, NULL, NULL ) )
                        {
                                /* do nothing */ ;
-                       } else 
-#endif /* SLAP_ACL_HONOR_DISCLOSE */
-                       {
+                       } else {
                                rs->sr_matched = matched->e_dn;
                        }
                }
@@ -97,13 +94,11 @@ return_results:;
                break;
 
        default:
-#ifdef SLAP_ACL_HONOR_DISCLOSE
                if ( !access_allowed_mask( op, e, slap_schema.si_ad_entry,
                                NULL, ACL_DISCLOSE, NULL, NULL ) )
                {
                        rs->sr_err = LDAP_NO_SUCH_OBJECT;
                }
-#endif /* SLAP_ACL_HONOR_DISCLOSE */
                break;
        }