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_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) {
|
||||
|
@ -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 ) {
|
||||
|
Loading…
Reference in New Issue
Block a user