Commit 0cc7ed6d authored by Howard Chu's avatar Howard Chu
Browse files

ITS#4394 fix segfault

parent bf81549c
......@@ -36,7 +36,7 @@ typedef struct auditlog_data {
char *ad_logfile;
} auditlog_data;
int fprint_ldif(FILE *f, char *name, char *val, ber_len_t len) {
static int fprint_ldif(FILE *f, char *name, char *val, ber_len_t len) {
char *s;
if((s = ldif_put(LDIF_PUT_VALUE, name, val, len)) == NULL)
return(-1);
......@@ -45,7 +45,7 @@ int fprint_ldif(FILE *f, char *name, char *val, ber_len_t len) {
return(0);
}
int auditlog_response(Operation *op, SlapReply *rs) {
static int auditlog_response(Operation *op, SlapReply *rs) {
slap_overinst *on = (slap_overinst *)op->o_bd->bd_info;
auditlog_data *ad = on->on_bi.bi_private;
FILE *f;
......@@ -78,7 +78,9 @@ int auditlog_response(Operation *op, SlapReply *rs) {
case LDAP_REQ_MODIFY:
what = "modify";
for(m = op->orm_modlist; m; m = m->sml_next)
if( m->sml_desc == slap_schema.si_ad_modifiersName ) {
if( m->sml_desc == slap_schema.si_ad_modifiersName &&
( m->sml_op == LDAP_MOD_ADD ||
m->sml_op == LDAP_MOD_REPLACE )) {
who = m->sml_values[0].bv_val;
break;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment