int li_age;
int li_cycle;
struct re_s *li_task;
+ int li_success;
} log_info;
static ConfigDriver log_cf_gen;
enum {
LOG_DB = 1,
LOG_OPS,
- LOG_PURGE
+ LOG_PURGE,
+ LOG_SUCCESS
};
static ConfigTable log_cfats[] = {
log_cf_gen, "( OLcfgOvAt:4.3 NAME 'olcAccessLogPurge' "
"DESC 'Log cleanup parameters' "
"SYNTAX OMsDirectoryString SINGLE-VALUE )", NULL, NULL },
+ { "logsuccess", NULL, 2, 2, 0, ARG_MAGIC|ARG_ON_OFF|LOG_SUCCESS,
+ log_cf_gen, "( OLcfgOvAt:4.4 NAME 'olcAccessLogSuccess' "
+ "DESC 'Log successful ops only' "
+ "SYNTAX OMsBoolean SINGLE-VALUE )", NULL, NULL },
{ NULL }
};
"DESC 'Access log configuration' "
"SUP olcOverlayConfig "
"MUST olcAccessLogDB "
- "MAY ( olcAccessLogOps $ olcAccessLogPurge ) )",
+ "MAY ( olcAccessLogOps $ olcAccessLogPurge $ olcAccessLogSuccess ) )",
Cft_Overlay, log_cfats },
{ NULL }
};
"SYNTAX OMsInteger "
"SINGLE-VALUE )", &ad_reqResult },
{ "( " LOG_SCHEMA_AT ".7 NAME 'reqAuthzID' "
- "DESC 'AUthorization ID of requestor' "
+ "DESC 'Authorization ID of requestor' "
"EQUALITY distinguishedNameMatch "
"SYNTAX OMsDN "
"SINGLE-VALUE )", &ad_reqAuthzID },
agebv.bv_len += cyclebv.bv_len;
value_add_one( &c->rvalue_vals, &agebv );
break;
+ case LOG_SUCCESS:
+ if ( li->li_success )
+ c->value_int = li->li_success;
+ else
+ rc = 1;
+ break;
}
break;
case LDAP_MOD_DELETE:
li->li_age = 0;
li->li_cycle = 0;
break;
+ case LOG_SUCCESS:
+ li->li_success = 0;
+ break;
}
break;
default:
}
}
break;
+ case LOG_SUCCESS:
+ li->li_success = c->value_int;
+ break;
}
break;
}
if ( rs->sr_type != REP_RESULT && rs->sr_type != REP_EXTENDED )
return SLAP_CB_CONTINUE;
+ if ( li->li_success && rs->sr_err != LDAP_SUCCESS )
+ return SLAP_CB_CONTINUE;
+
switch ( op->o_tag ) {
case LDAP_REQ_ADD: logop = LOG_EN_ADD; break;
case LDAP_REQ_DELETE: logop = LOG_EN_DELETE; break;