]> git.sur5r.net Git - openldap/commitdiff
Use individual addAttrDN, compareAttrDN, modifyAttrDN, searchAttrDN contexts
authorHoward Chu <hyc@openldap.org>
Mon, 7 Apr 2003 11:55:12 +0000 (11:55 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 7 Apr 2003 11:55:12 +0000 (11:55 +0000)
instead of re-using other contexts.

servers/slapd/back-ldap/add.c
servers/slapd/back-ldap/compare.c
servers/slapd/back-ldap/modify.c
servers/slapd/back-ldap/search.c

index 3244c0b12f912b5050dc3e46f0ad8fa22ca2eb91..7344aa5605e51e404adf1bd6767d5336adcbe4f4 100644 (file)
@@ -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 );
 
index dd0b0cf227807bdb709dad7fd9afdccecf2b8f04..f1dfb35b7998c3c216fc9f6102f8d74932940ec4 100644 (file)
@@ -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') {
index 2e1e61a8aba0f3d363d682196fbf9df0786a503a..60d77dc6e99bf07479302a21e7458213e2033d91 100644 (file)
@@ -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;
index fe2755c67a31971b7cff0dac9549bbebfc1de30c..db8c2275448fcec9b1d101c77628a632f32ef48a 100644 (file)
@@ -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')