]> git.sur5r.net Git - openldap/commitdiff
Only log realdn if it's non-empty
authorHoward Chu <hyc@openldap.org>
Wed, 31 May 2006 01:45:39 +0000 (01:45 +0000)
committerHoward Chu <hyc@openldap.org>
Wed, 31 May 2006 01:45:39 +0000 (01:45 +0000)
servers/slapd/overlays/auditlog.c

index 35b8aba7e3b1fcf4ace98abac983213cee10e547..3dff229f4bdca31ac264ff9b99dd2b38021520d9 100644 (file)
@@ -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 :
-                       "<empty>" );
+       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);