From 54231dd13f5d6416692d398c34df7f6afab2afd1 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Wed, 31 May 2006 01:45:39 +0000 Subject: [PATCH] Only log realdn if it's non-empty --- servers/slapd/overlays/auditlog.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); -- 2.39.5