mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-24 13:24:56 +08:00
use slap_str2undef_ad for unknown attributes
This commit is contained in:
parent
8a3768276a
commit
35c38e271d
@ -435,8 +435,21 @@ ldap_send_entry(
|
|||||||
attr->a_next = 0;
|
attr->a_next = 0;
|
||||||
attr->a_desc = NULL;
|
attr->a_desc = NULL;
|
||||||
if (slap_str2ad(mapped, &attr->a_desc, &text) != LDAP_SUCCESS) {
|
if (slap_str2ad(mapped, &attr->a_desc, &text) != LDAP_SUCCESS) {
|
||||||
ch_free(attr);
|
if (slap_str2undef_ad(mapped, &attr->a_desc, &text)
|
||||||
continue;
|
!= 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);
|
attr->a_vals = ldap_get_values_len(lc->ld, e, a);
|
||||||
if (!attr->a_vals) {
|
if (!attr->a_vals) {
|
||||||
|
@ -652,8 +652,20 @@ meta_send_entry(
|
|||||||
attr->a_desc = NULL;
|
attr->a_desc = NULL;
|
||||||
if ( slap_str2ad( mapped, &attr->a_desc, &text )
|
if ( slap_str2ad( mapped, &attr->a_desc, &text )
|
||||||
!= LDAP_SUCCESS) {
|
!= LDAP_SUCCESS) {
|
||||||
ch_free( attr );
|
if (slap_str2undef_ad(mapped, &attr->a_desc, &text)
|
||||||
continue;
|
!= 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 );
|
attr->a_vals = ldap_get_values_len( lsc->ld, e, a );
|
||||||
if ( !attr->a_vals ) {
|
if ( !attr->a_vals ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user