From: Howard Chu Date: Mon, 7 Apr 2003 20:16:56 +0000 (+0000) Subject: schema checks X-Git-Tag: AUTOCONF_2_57~3 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=91bb1bd9806aa1fccfc2b950306e1bb4998ee2a4;p=openldap schema checks --- diff --git a/servers/slapd/back-ldap/compare.c b/servers/slapd/back-ldap/compare.c index fdf17a74df..177cd21b6d 100644 --- a/servers/slapd/back-ldap/compare.c +++ b/servers/slapd/back-ldap/compare.c @@ -80,7 +80,8 @@ ldap_back_compare( return -1; } - if ( op->oq_compare.rs_ava->aa_desc == slap_schema.si_ad_objectClass ) { + if ( op->orc_ava->aa_desc == slap_schema.si_ad_objectClass + || op->orc_ava->a_desc == slap_schema.si_ad_structuralObjectClass ) { ldap_back_map(&li->rwmap.rwm_oc, &op->orc_ava->aa_value, &mapped_val, BACKLDAP_MAP); if (mapped_val.bv_val == NULL || mapped_val.bv_val[0] == '\0') { diff --git a/servers/slapd/back-ldap/map.c b/servers/slapd/back-ldap/map.c index 094ac9b846..be02636c36 100644 --- a/servers/slapd/back-ldap/map.c +++ b/servers/slapd/back-ldap/map.c @@ -188,7 +188,7 @@ map_attr_value( return 0; } - if ( strcmp( ad->ad_type->sat_syntax->ssyn_oid, SLAPD_DN_SYNTAX ) == 0 ) + if ( ad->ad_type->sat_syntax == slap_schema.si_syn_distinguishedName ) { dncookie fdc = *dc; diff --git a/servers/slapd/back-ldap/suffixmassage.c b/servers/slapd/back-ldap/suffixmassage.c index bf3100e82c..81b1debc33 100644 --- a/servers/slapd/back-ldap/suffixmassage.c +++ b/servers/slapd/back-ldap/suffixmassage.c @@ -146,9 +146,9 @@ ldap_back_dn_massage( strncpy( res->bv_val, dn->bv_val, diff ); strcpy( &res->bv_val[diff], dc->rwmap->rwm_suffix_massage[i+dst].bv_val ); #ifdef NEW_LOGGING - LDAP_LOG ( BACK_LDAP, ARGS, - "ldap_back_dn_massage: converted \"%s\" to \"%s\"\n", - dn->bv_val, res->bv_val, 0 ); + LDAP_LOG ( BACK_LDAP, ARGS, + "ldap_back_dn_massage: converted \"%s\" to \"%s\"\n", + dn->bv_val, res->bv_val, 0 ); #else Debug( LDAP_DEBUG_ARGS, "ldap_back_dn_massage:"