mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
ITS#7929 don't log internal searches
This commit is contained in:
parent
4ea2fe90e8
commit
3d52e63366
@ -1509,6 +1509,11 @@ static int accesslog_response(Operation *op, SlapReply *rs) {
|
|||||||
ldap_pvt_thread_rmutex_unlock( &li->li_op_rmutex, op->o_tid );
|
ldap_pvt_thread_rmutex_unlock( &li->li_op_rmutex, op->o_tid );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ignore these internal reads */
|
||||||
|
if (( lo->mask & LOG_OP_READS ) && op->o_do_not_cache ) {
|
||||||
|
return SLAP_CB_CONTINUE;
|
||||||
|
}
|
||||||
|
|
||||||
if ( li->li_success && rs->sr_err != LDAP_SUCCESS )
|
if ( li->li_success && rs->sr_err != LDAP_SUCCESS )
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
|
@ -293,6 +293,7 @@ memberof_isGroupOrMember( Operation *op, memberof_cbinfo_t *mci )
|
|||||||
an[ 0 ].an_name = an[ 0 ].an_desc->ad_cname;
|
an[ 0 ].an_name = an[ 0 ].an_desc->ad_cname;
|
||||||
op2.ors_filterstr = mo->mo_groupFilterstr;
|
op2.ors_filterstr = mo->mo_groupFilterstr;
|
||||||
op2.ors_filter = &mo->mo_groupFilter;
|
op2.ors_filter = &mo->mo_groupFilter;
|
||||||
|
op2.o_do_not_cache = 1; /* internal search, don't log */
|
||||||
|
|
||||||
memberof_set_backend( &op2, op, on );
|
memberof_set_backend( &op2, op, on );
|
||||||
(void)op->o_bd->be_search( &op2, &rs2 );
|
(void)op->o_bd->be_search( &op2, &rs2 );
|
||||||
@ -315,6 +316,7 @@ memberof_isGroupOrMember( Operation *op, memberof_cbinfo_t *mci )
|
|||||||
an[ 0 ].an_name = an[ 0 ].an_desc->ad_cname;
|
an[ 0 ].an_name = an[ 0 ].an_desc->ad_cname;
|
||||||
op2.ors_filterstr = mo->mo_memberFilterstr;
|
op2.ors_filterstr = mo->mo_memberFilterstr;
|
||||||
op2.ors_filter = &mo->mo_memberFilter;
|
op2.ors_filter = &mo->mo_memberFilter;
|
||||||
|
op2.o_do_not_cache = 1; /* internal search, don't log */
|
||||||
|
|
||||||
memberof_set_backend( &op2, op, on );
|
memberof_set_backend( &op2, op, on );
|
||||||
(void)op->o_bd->be_search( &op2, &rs2 );
|
(void)op->o_bd->be_search( &op2, &rs2 );
|
||||||
|
@ -528,15 +528,19 @@ refint_repair(
|
|||||||
Operation op2;
|
Operation op2;
|
||||||
unsigned long opid;
|
unsigned long opid;
|
||||||
int rc;
|
int rc;
|
||||||
|
int cache;
|
||||||
|
|
||||||
op->o_callback->sc_response = refint_search_cb;
|
op->o_callback->sc_response = refint_search_cb;
|
||||||
op->o_req_dn = op->o_bd->be_suffix[ 0 ];
|
op->o_req_dn = op->o_bd->be_suffix[ 0 ];
|
||||||
op->o_req_ndn = op->o_bd->be_nsuffix[ 0 ];
|
op->o_req_ndn = op->o_bd->be_nsuffix[ 0 ];
|
||||||
op->o_dn = op->o_bd->be_rootdn;
|
op->o_dn = op->o_bd->be_rootdn;
|
||||||
op->o_ndn = op->o_bd->be_rootndn;
|
op->o_ndn = op->o_bd->be_rootndn;
|
||||||
|
cache = op->o_do_not_cache;
|
||||||
|
op->o_do_not_cache = 1;
|
||||||
|
|
||||||
/* search */
|
/* search */
|
||||||
rc = op->o_bd->be_search( op, &rs );
|
rc = op->o_bd->be_search( op, &rs );
|
||||||
|
op->o_do_not_cache = cache;
|
||||||
|
|
||||||
if ( rc != LDAP_SUCCESS ) {
|
if ( rc != LDAP_SUCCESS ) {
|
||||||
Debug( LDAP_DEBUG_TRACE,
|
Debug( LDAP_DEBUG_TRACE,
|
||||||
|
Loading…
Reference in New Issue
Block a user