From: Pierangelo Masarati Date: Wed, 3 Oct 2001 18:17:08 +0000 (+0000) Subject: use slap_str2undef_ad for unknown attributes X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~1011 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=35c38e271d811c5bd8971de10083c3ebf38f7f77;p=openldap use slap_str2undef_ad for unknown attributes --- diff --git a/servers/slapd/back-ldap/search.c b/servers/slapd/back-ldap/search.c index 629155c45a..fa35d582e5 100644 --- a/servers/slapd/back-ldap/search.c +++ b/servers/slapd/back-ldap/search.c @@ -435,8 +435,21 @@ ldap_send_entry( attr->a_next = 0; attr->a_desc = NULL; if (slap_str2ad(mapped, &attr->a_desc, &text) != LDAP_SUCCESS) { - ch_free(attr); - continue; + if (slap_str2undef_ad(mapped, &attr->a_desc, &text) + != LDAP_SUCCESS) { +#ifdef NEW_LOGGING + LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1, + "slap_str2undef_ad(%s): " + "%s\n", mapped, text )); +#else /* !NEW_LOGGING */ + Debug( LDAP_DEBUG_ANY, + "slap_str2undef_ad(%s): " + "%s\n%s", mapped, text, "" ); +#endif /* !NEW_LOGGING */ + + ch_free(attr); + continue; + } } attr->a_vals = ldap_get_values_len(lc->ld, e, a); if (!attr->a_vals) { diff --git a/servers/slapd/back-meta/search.c b/servers/slapd/back-meta/search.c index f861fb6499..c033f66d8b 100644 --- a/servers/slapd/back-meta/search.c +++ b/servers/slapd/back-meta/search.c @@ -652,8 +652,20 @@ meta_send_entry( attr->a_desc = NULL; if ( slap_str2ad( mapped, &attr->a_desc, &text ) != LDAP_SUCCESS) { - ch_free( attr ); - continue; + if (slap_str2undef_ad(mapped, &attr->a_desc, &text) + != LDAP_SUCCESS) { +#ifdef NEW_LOGGING + LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1, + "slap_str2undef_ad(%s): " + "%s\n", mapped, text )); +#else /* !NEW_LOGGING */ + Debug( LDAP_DEBUG_ANY, + "slap_str2undef_ad(%s): " + "%s\n%s", mapped, text, "" ); +#endif /* !NEW_LOGGING */ + ch_free(attr); + continue; + } } attr->a_vals = ldap_get_values_len( lsc->ld, e, a ); if ( !attr->a_vals ) {