From: Pierangelo Masarati Date: Wed, 4 May 2005 11:17:41 +0000 (+0000) Subject: import fix to ITS#3698 X-Git-Tag: OPENLDAP_REL_ENG_2_2_27~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=08f771c0ad7052c9d4c9c035afe9574bbca2049f;p=thirdparty%2Fopenldap.git import fix to ITS#3698 --- diff --git a/CHANGES b/CHANGES index 2e352c6815..60381c97bc 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,7 @@ OpenLDAP 2.2 Change Log OpenLDAP 2.2.27 Engineering + Fixed back-ldap/back-meta debug output of NULL strings (ITS#3698) Fixed syncrepl runqueue (ITS#3542) Fixed ACL val default style parsing crasher (ITS#3700) Build Environment diff --git a/servers/slapd/back-ldap/map.c b/servers/slapd/back-ldap/map.c index 1300cafba1..da47835607 100644 --- a/servers/slapd/back-ldap/map.c +++ b/servers/slapd/back-ldap/map.c @@ -511,11 +511,15 @@ ldap_back_filter_map_rewrite( #ifdef NEW_LOGGING LDAP_LOG( BACK_LDAP, DETAIL1, "[rw] %s: \"%s\" -> \"%s\"\n", - dc->ctx, ftmp.bv_val, fstr->bv_val ); + dc->ctx, + BER_BVISNULL( &ftmp ) ? "" : ftmp.bv_val, + BER_BVISNULL( fstr ) ? "" : fstr->bv_val ); #else /* !NEW_LOGGING */ Debug( LDAP_DEBUG_ARGS, "[rw] %s: \"%s\" -> \"%s\"\n", - dc->ctx, ftmp.bv_val, fstr->bv_val ); + dc->ctx, + BER_BVISNULL( &ftmp ) ? "" : ftmp.bv_val, + BER_BVISNULL( fstr ) ? "" : fstr->bv_val ); #endif /* !NEW_LOGGING */ rc = LDAP_SUCCESS; break; diff --git a/servers/slapd/back-ldap/suffixmassage.c b/servers/slapd/back-ldap/suffixmassage.c index eb09340772..7f4ca5cc96 100644 --- a/servers/slapd/back-ldap/suffixmassage.c +++ b/servers/slapd/back-ldap/suffixmassage.c @@ -56,11 +56,15 @@ ldap_back_dn_massage( #ifdef NEW_LOGGING LDAP_LOG( BACK_LDAP, DETAIL1, "[rw] %s: \"%s\" -> \"%s\"\n", - dc->ctx, dn->bv_val, res->bv_val ); + dc->ctx, + BER_BVISNULL( dn ) ? "" : dn->bv_val, + BER_BVISNULL( res ) ? "" : res->bv_val ); #else /* !NEW_LOGGING */ Debug( LDAP_DEBUG_ARGS, "[rw] %s: \"%s\" -> \"%s\"\n", - dc->ctx, dn->bv_val, res->bv_val ); + dc->ctx, + BER_BVISNULL( dn ) ? "" : dn->bv_val, + BER_BVISNULL( res ) ? "" : res->bv_val ); #endif /* !NEW_LOGGING */ rc = LDAP_SUCCESS; break; @@ -148,12 +152,14 @@ ldap_back_dn_massage( #ifdef NEW_LOGGING LDAP_LOG ( BACK_LDAP, ARGS, "ldap_back_dn_massage: converted \"%s\" to \"%s\"\n", - dn->bv_val, res->bv_val, 0 ); + BER_BVISNULL( dn ) ? "" : dn->bv_val, + BER_BVISNULL( res ) ? "" : res->bv_val, 0 ); #else Debug( LDAP_DEBUG_ARGS, "ldap_back_dn_massage:" " converted \"%s\" to \"%s\"\n", - dn->bv_val, res->bv_val, 0 ); + BER_BVISNULL( dn ) ? "" : dn->bv_val, + BER_BVISNULL( res ) ? "" : res->bv_val, 0 ); #endif break; }