From: Howard Chu Date: Mon, 7 Apr 2003 11:55:12 +0000 (+0000) Subject: Use individual addAttrDN, compareAttrDN, modifyAttrDN, searchAttrDN contexts X-Git-Tag: AUTOCONF_2_57~16 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c823f9a995ce4e14dfde1eab58d224acea700e72;p=openldap Use individual addAttrDN, compareAttrDN, modifyAttrDN, searchAttrDN contexts instead of re-using other contexts. --- diff --git a/servers/slapd/back-ldap/add.c b/servers/slapd/back-ldap/add.c index 3244c0b12f..7344aa5605 100644 --- a/servers/slapd/back-ldap/add.c +++ b/servers/slapd/back-ldap/add.c @@ -95,6 +95,9 @@ ldap_back_add( /* Create array of LDAPMods for ldap_add() */ attrs = (LDAPMod **)ch_malloc(sizeof(LDAPMod *)*i); +#ifdef ENABLE_REWRITE + dc.ctx = "addAttrDN"; +#endif for (i=0, a=op->oq_add.rs_e->e_attrs; a; a=a->a_next) { if ( a->a_desc->ad_type->sat_no_user_mod ) { continue; @@ -154,9 +157,6 @@ ldap_dnattr_rewrite( { struct berval bv; -#ifdef ENABLE_REWRITE - dc->ctx="dnAttr"; -#endif for ( ; a_vals->bv_val != NULL; a_vals++ ) { ldap_back_dn_massage( dc, a_vals, &bv ); diff --git a/servers/slapd/back-ldap/compare.c b/servers/slapd/back-ldap/compare.c index dd0b0cf227..f1dfb35b79 100644 --- a/servers/slapd/back-ldap/compare.c +++ b/servers/slapd/back-ldap/compare.c @@ -95,7 +95,7 @@ ldap_back_compare( } if (op->orc_ava->aa_desc->ad_type->sat_syntax == slap_schema.si_syn_distinguishedName ) { #ifdef ENABLE_REWRITE - dc.ctx = "dnAttr"; + dc.ctx = "compareAttrDN"; #endif ldap_back_dn_massage( &dc, &op->orc_ava->aa_value, &mapped_val ); if (mapped_val.bv_val == NULL || mapped_val.bv_val[0] == '\0') { diff --git a/servers/slapd/back-ldap/modify.c b/servers/slapd/back-ldap/modify.c index 2e1e61a8ab..60d77dc6e9 100644 --- a/servers/slapd/back-ldap/modify.c +++ b/servers/slapd/back-ldap/modify.c @@ -97,6 +97,9 @@ ldap_back_modify( goto cleanup; } +#ifdef ENABLE_REWRITE + dc.ctx = "modifyAttrDN"; +#endif for (i=0, ml=op->oq_modify.rs_modlist; ml; ml=ml->sml_next) { if ( ml->sml_desc->ad_type->sat_no_user_mod ) { continue; diff --git a/servers/slapd/back-ldap/search.c b/servers/slapd/back-ldap/search.c index fe2755c67a..db8c227544 100644 --- a/servers/slapd/back-ldap/search.c +++ b/servers/slapd/back-ldap/search.c @@ -421,6 +421,9 @@ ldap_build_entry( ent->e_private = 0; attrp = &ent->e_attrs; +#ifdef ENABLE_REWRITE + dc.ctx = "searchAttrDN"; +#endif while ( ber_scanf( &ber, "{m", &a ) != LBER_ERROR ) { ldap_back_map(&li->at_map, &a, &mapped, BACKLDAP_REMAP); if (mapped.bv_val == NULL || mapped.bv_val[0] == '\0')