From: Howard Chu Date: Wed, 31 May 2006 01:45:39 +0000 (+0000) Subject: Only log realdn if it's non-empty X-Git-Tag: OPENLDAP_REL_ENG_2_4_3ALPHA~9^2~191 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=54231dd13f5d6416692d398c34df7f6afab2afd1;p=openldap Only log realdn if it's non-empty --- diff --git a/servers/slapd/overlays/auditlog.c b/servers/slapd/overlays/auditlog.c index 35b8aba7e3..3dff229f4b 100644 --- a/servers/slapd/overlays/auditlog.c +++ b/servers/slapd/overlays/auditlog.c @@ -128,9 +128,9 @@ static int auditlog_response(Operation *op, SlapReply *rs) { fprintf(f, "# %s %ld %s%s%s\n", what, stamp, suffix, who ? " " : "", who ? who->bv_val : ""); - if ( !who || !dn_match( who, &op->o_conn->c_dn )) - fprintf(f, "# realdn: %s\n", op->o_conn->c_dn.bv_val ? op->o_conn->c_dn.bv_val : - "" ); + if ( !BER_BVISEMPTY( &op->o_conn->c_dn ) && + (!who || !dn_match( who, &op->o_conn->c_dn ))) + fprintf(f, "# realdn: %s\n", op->o_conn->c_dn.bv_val ); fprintf(f, "dn: %s\nchangetype: %s\n", op->o_req_dn.bv_val, what);