]> git.sur5r.net Git - openldap/commitdiff
s/managedit/relax/
authorKurt Zeilenga <kurt@openldap.org>
Tue, 22 Aug 2006 23:31:46 +0000 (23:31 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Tue, 22 Aug 2006 23:31:46 +0000 (23:31 +0000)
#unifdef -DSLAP_RELAX

16 files changed:
include/slapi-plugin.h
servers/slapd/acl.c
servers/slapd/back-bdb/add.c
servers/slapd/back-bdb/modify.c
servers/slapd/back-ldap/add.c
servers/slapd/back-ldap/modify.c
servers/slapd/back-meta/add.c
servers/slapd/back-meta/modify.c
servers/slapd/backend.c
servers/slapd/controls.c
servers/slapd/modify.c
servers/slapd/overlays/dds.c
servers/slapd/overlays/ppolicy.c
servers/slapd/overlays/rwm.c
servers/slapd/slap.h
servers/slapd/slapi/slapi_pblock.c

index a59e7a9d3f4515716ce2122b8ad9ddb2565f98da..5598dcc4cba24d8348b5b867c19d91f35c37dc6d 100644 (file)
@@ -528,7 +528,8 @@ int slapi_x_backend_get_flags( const Slapi_Backend *be, unsigned long *flags );
 #define SLAPI_X_CONN_SSF                       1303
 #define SLAPI_X_CONN_SASL_CONTEXT              1304
 #define SLAPI_X_OPERATION_DELETE_GLUE_PARENT   1305
-#define SLAPI_X_MANAGEDIT                      1306
+#define SLAPI_X_RELAX                  1306
+#define SLAPI_X_MANAGEDIT                      SLAPI_X_RELAX
 #define SLAPI_X_OPERATION_NO_SCHEMA_CHECK      1307
 #define SLAPI_X_ADD_STRUCTURAL_CLASS           1308
 #define SLAPI_X_OPERATION_NO_SUBORDINATE_GLUE  1309
index f3959b3ed590ed041ffd777b7de73222672f8835..7b1c4a0854556da8466b02fd5dc56ff02ec7528a 100644 (file)
@@ -354,7 +354,7 @@ access_allowed_mask(
                {
                        access = ACL_AUTH;
 
-               } else if ( get_manageDIT( op ) && access_level == ACL_WRITE &&
+               } else if ( get_relax( op ) && access_level == ACL_WRITE &&
                        desc == slap_schema.si_ad_entry )
                {
                        access = ACL_MANAGE;
index 1c7be0387ec1622d656111bb6a321eb0bde16f26..83a809e57416b6e079407a3cff2168172c39e28d 100644 (file)
@@ -97,7 +97,7 @@ txnReturn:
 
        /* check entry's schema */
        rs->sr_err = entry_schema_check( op, op->oq_add.rs_e, NULL,
-               get_manageDIT(op), &rs->sr_text, textbuf, textlen );
+               get_relax(op), &rs->sr_text, textbuf, textlen );
        if ( rs->sr_err != LDAP_SUCCESS ) {
                Debug( LDAP_DEBUG_TRACE,
                        LDAP_XSTRING(bdb_add) ": entry failed schema check: "
index 9967bdb80637f24865dc25d9d11de84e8e3091e4..76cf27bab87fa391d9f7203b777b1cf568eb6b08 100644 (file)
@@ -205,7 +205,7 @@ int bdb_modify_internal(
        }
 
        /* check that the entry still obeys the schema */
-       rc = entry_schema_check( op, e, save_attrs, get_manageDIT(op),
+       rc = entry_schema_check( op, e, save_attrs, get_relax(op),
                text, textbuf, textlen );
        if ( rc != LDAP_SUCCESS || op->o_noop ) {
                attrs_free( e->e_attrs );
index e79f847bc64424390f40e508364cc0246c0126f7..1989a5b608627b6317b7101dad6c640f0907b7de 100644 (file)
@@ -71,7 +71,7 @@ ldap_back_add(
 
        isupdate = be_shadow_update( op );
        for ( i = 0, a = op->oq_add.rs_e->e_attrs; a; a = a->a_next ) {
-               if ( !isupdate && !get_manageDIT( op ) && a->a_desc->ad_type->sat_no_user_mod  )
+               if ( !isupdate && !get_relax( op ) && a->a_desc->ad_type->sat_no_user_mod  )
                {
                        continue;
                }
index 7e6e7ecad5596d19888117f41e99370944583a27..648dc18a0d293fae536d15a4d8695760cd046b5d 100644 (file)
@@ -66,7 +66,7 @@ ldap_back_modify(
 
        isupdate = be_shadow_update( op );
        for ( i = 0, ml = op->oq_modify.rs_modlist; ml; ml = ml->sml_next ) {
-               if ( !isupdate && !get_manageDIT( op ) && ml->sml_desc->ad_type->sat_no_user_mod  )
+               if ( !isupdate && !get_relax( op ) && ml->sml_desc->ad_type->sat_no_user_mod  )
                {
                        continue;
                }
index 6ff7a9c81e0e92b009d05c69b20dc1fc65c0851d..311b6d2f041e9e6e400b311d0ecaf3a886f4a53c 100644 (file)
@@ -86,7 +86,7 @@ meta_back_add( Operation *op, SlapReply *rs )
        for ( i = 0, a = op->ora_e->e_attrs; a; a = a->a_next ) {
                int                     j, is_oc = 0;
 
-               if ( !isupdate && !get_manageDIT( op ) && a->a_desc->ad_type->sat_no_user_mod  )
+               if ( !isupdate && !get_relax( op ) && a->a_desc->ad_type->sat_no_user_mod  )
                {
                        continue;
                }
index 6d1c3732f6265840e1367f64306ba27a02d9ae3f..bde4dd220a9f0c122a7c2dadfce4d10831b1e66c 100644 (file)
@@ -92,7 +92,7 @@ meta_back_modify( Operation *op, SlapReply *rs )
        for ( i = 0, ml = op->orm_modlist; ml; ml = ml->sml_next ) {
                int     j, is_oc = 0;
 
-               if ( !isupdate && !get_manageDIT( op ) && ml->sml_desc->ad_type->sat_no_user_mod  )
+               if ( !isupdate && !get_relax( op ) && ml->sml_desc->ad_type->sat_no_user_mod  )
                {
                        continue;
                }
index 514a919a68d06f316a38a4c9dd9c85e3d3c02a74..65ec9a7829564fd19baaf6249d49341dca579b08 100644 (file)
@@ -867,10 +867,9 @@ backend_check_controls(
                }
        }
 
-       /* temporarily removed */
-#if 0
+#if 0 /* temporarily removed */
        /* check should be generalized */
-       if( get_manageDIT(op) && !be_isroot(op)) {
+       if( get_relax(op) && !be_isroot(op)) {
                rs->sr_text = "requires manager authorization";
                rs->sr_err = LDAP_UNWILLING_TO_PERFORM;
        }
index 857a13e57387e1887941f82a8001f43ad90cd4c8..b6c356e7413293b2f07234363f799e970749b2e3 100644 (file)
 #include "../../libraries/liblber/lber-int.h"
 
 static SLAP_CTRL_PARSE_FN parseAssert;
-static SLAP_CTRL_PARSE_FN parsePreRead;
-static SLAP_CTRL_PARSE_FN parsePostRead;
-static SLAP_CTRL_PARSE_FN parseProxyAuthz;
+static SLAP_CTRL_PARSE_FN parseDomainScope;
 static SLAP_CTRL_PARSE_FN parseDontUseCopy;
-#ifdef SLAP_RELAX
-static SLAP_CTRL_PARSE_FN parseManageDIT;
-#endif
 static SLAP_CTRL_PARSE_FN parseManageDSAit;
 static SLAP_CTRL_PARSE_FN parseNoOp;
 static SLAP_CTRL_PARSE_FN parsePagedResults;
+static SLAP_CTRL_PARSE_FN parsePermissiveModify;
+static SLAP_CTRL_PARSE_FN parsePreRead, parsePostRead;
+static SLAP_CTRL_PARSE_FN parseProxyAuthz;
+static SLAP_CTRL_PARSE_FN parseRelax;
+static SLAP_CTRL_PARSE_FN parseSearchOptions;
 #ifdef SLAP_SORTEDRESULTS
 static SLAP_CTRL_PARSE_FN parseSortedResults;
 #endif
-static SLAP_CTRL_PARSE_FN parseValuesReturnFilter;
-static SLAP_CTRL_PARSE_FN parsePermissiveModify;
-static SLAP_CTRL_PARSE_FN parseDomainScope;
+static SLAP_CTRL_PARSE_FN parseSubentries;
 #ifdef SLAP_CONTROL_X_TREE_DELETE
 static SLAP_CTRL_PARSE_FN parseTreeDelete;
 #endif
-static SLAP_CTRL_PARSE_FN parseSearchOptions;
-static SLAP_CTRL_PARSE_FN parseSubentries;
+static SLAP_CTRL_PARSE_FN parseValuesReturnFilter;
 
 #undef sc_mask /* avoid conflict with Irix 6.5 <sys/signal.h> */
 
@@ -177,13 +174,11 @@ static struct slap_control control_defs[] = {
                SLAP_CTRL_ACCESS|SLAP_CTRL_HIDE,
                NULL, NULL,
                parseNoOp, LDAP_SLIST_ENTRY_INITIALIZER(next) },
-#ifdef SLAP_RELAX
        { LDAP_CONTROL_RELAX,
-               (int)offsetof(struct slap_control_ids, sc_manageDIT),
+               (int)offsetof(struct slap_control_ids, sc_relax),
                SLAP_CTRL_GLOBAL|SLAP_CTRL_UPDATE|SLAP_CTRL_HIDE,
                NULL, NULL,
-               parseManageDIT, LDAP_SLIST_ENTRY_INITIALIZER(next) },
-#endif
+               parseRelax, LDAP_SLIST_ENTRY_INITIALIZER(next) },
 #ifdef LDAP_X_TXN
        { LDAP_CONTROL_X_TXN_SPEC,
                (int)offsetof(struct slap_control_ids, sc_txnSpec),
@@ -868,13 +863,12 @@ static int parseDontUseCopy (
        return LDAP_SUCCESS;
 }
 
-#ifdef SLAP_RELAX
-static int parseManageDIT (
+static int parseRelax (
        Operation *op,
        SlapReply *rs,
        LDAPControl *ctrl )
 {
-       if ( op->o_managedit != SLAP_CONTROL_NONE ) {
+       if ( op->o_relax != SLAP_CONTROL_NONE ) {
                rs->sr_text = "relax control specified multiple times";
                return LDAP_PROTOCOL_ERROR;
        }
@@ -884,13 +878,12 @@ static int parseManageDIT (
                return LDAP_PROTOCOL_ERROR;
        }
 
-       op->o_managedit = ctrl->ldctl_iscritical
+       op->o_relax = ctrl->ldctl_iscritical
                ? SLAP_CONTROL_CRITICAL
                : SLAP_CONTROL_NONCRITICAL;
 
        return LDAP_SUCCESS;
 }
-#endif
 
 static int parseManageDSAit (
        Operation *op,
index dc2af62473d507d6a2f33ccd6a7a2398b88e98d7..bab4bb0ffd7244aa4aa12f7971d7bb395c046142 100644 (file)
@@ -442,7 +442,7 @@ slap_mods_obsolete_check(
        char *textbuf,
        size_t textlen )
 {
-       if( get_manageDIT( op ) ) return LDAP_SUCCESS;
+       if( get_relax( op ) ) return LDAP_SUCCESS;
 
        for ( ; ml != NULL; ml = ml->sml_next ) {
                if ( is_at_obsolete( ml->sml_desc->ad_type ) &&
@@ -481,7 +481,7 @@ slap_mods_no_user_mod_check(
                        continue;
                }
 
-               if ( get_manageDIT( op ) ) {
+               if ( get_relax( op ) ) {
                        if ( ml->sml_desc->ad_type->sat_flags & SLAP_AT_MANAGEABLE ) {
                                ml->sml_flags |= SLAP_MOD_MANAGING;
                                continue;
index 137712b8ca0a9fa452727c976aeab72eda573074..369cbd075e0fe851b32cf57f0b62f473e1a7acbd 100644 (file)
@@ -694,7 +694,7 @@ done:;
        if ( rs->sr_err == LDAP_SUCCESS ) {
                int     rc;
 
-               /* FIXME: this could be allowed when manageDIT is used...
+               /* FIXME: this could be allowed when the Relax control is used...
                 * in that case:
                 *
                 * TODO
@@ -713,7 +713,7 @@ done:;
                rc = is_dynamicObject - was_dynamicObject;
                if ( rc ) {
 #if 0 /* fix subordinate issues first */
-                       if ( get_manageDIT( op ) ) {
+                       if ( get_relax( op ) ) {
                                switch ( rc ) {
                                case -1:
                                        /* need to delete entryTtl to have a consistent entry */
@@ -1077,7 +1077,7 @@ dds_op_extended( Operation *op, SlapReply *rs )
                }
 
                /* we require manage privileges on the entryTtl,
-                * and fake a manageDIT control */
+                * and fake a Relax control */
                op2.o_tag = LDAP_REQ_MODIFY;
                op2.o_bd = &db;
                db.bd_info = (BackendInfo *)on->on_info;
@@ -1085,7 +1085,7 @@ dds_op_extended( Operation *op, SlapReply *rs )
                sc.sc_response = slap_replog_cb;
                sc.sc_next = &sc2;
                sc2.sc_response = slap_null_cb;
-               op2.o_managedit = SLAP_CONTROL_CRITICAL;
+               op2.o_relax = SLAP_CONTROL_CRITICAL;
                op2.orm_modlist = &ttlmod;
 
                ttlmod.sml_op = LDAP_MOD_REPLACE;
index cc5066ffa7042c7fc93de43953114d1668585cbf..c68c0e9a8b29fc3c01453451d586b5267285cd65 100644 (file)
@@ -122,7 +122,7 @@ static struct schema_info {
                "SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 "
                "SINGLE-VALUE "
 #if 0
-               /* Not until MANAGEDIT control is released */
+               /* Not until Relax control is released */
                "NO-USER-MODIFICATION "
 #endif
                "USAGE directoryOperation )",
@@ -163,7 +163,7 @@ static struct schema_info {
                "SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 "
                "SINGLE-VALUE "
 #if 0
-               /* Not until MANAGEDIT control is released */
+               /* Not until Relax control is released */
                "NO-USER-MODIFICATION "
 #endif
                "USAGE directoryOperation )",
index 2e07c98104628baf49a59f04c70f7aebb79f7943..7948927b87a243d23d30439597a5686408db7fe2 100644 (file)
@@ -157,7 +157,7 @@ rwm_op_add( Operation *op, SlapReply *rs )
                                }
                        }
 
-               } else if ( !isupdate && !get_manageDIT( op ) && (*ap)->a_desc->ad_type->sat_no_user_mod )
+               } else if ( !isupdate && !get_relax( op ) && (*ap)->a_desc->ad_type->sat_no_user_mod )
                {
                        goto next_attr;
 
@@ -441,7 +441,7 @@ rwm_op_modify( Operation *op, SlapReply *rs )
                {
                        is_oc = 1;
 
-               } else if ( !isupdate && !get_manageDIT( op ) && (*mlp)->sml_desc->ad_type->sat_no_user_mod  )
+               } else if ( !isupdate && !get_relax( op ) && (*mlp)->sml_desc->ad_type->sat_no_user_mod  )
                {
                        goto next_mod;
 
@@ -988,7 +988,7 @@ rwm_attrs( Operation *op, SlapReply *rs, Attribute** a_first, int stripEntryDN )
                        }
                        
                } else if ( !isupdate
-                       && !get_manageDIT( op )
+                       && !get_relax( op )
                        && (*ap)->a_desc->ad_type->sat_no_user_mod 
                        && (*ap)->a_desc->ad_type != slap_schema.si_at_undefined )
                {
index 9e0bec8193147e7fa09b3a1a4e9f99d168cab52e..75100eb8fc9244c5c9df1a69c1cc8f8a00266e84 100644 (file)
@@ -2295,7 +2295,6 @@ struct slap_control_ids {
        int sc_assert;
        int sc_domainScope;
        int sc_dontUseCopy;
-       int sc_manageDIT;
        int sc_manageDSAit;
        int sc_modifyIncrement;
        int sc_noOp;
@@ -2304,6 +2303,7 @@ struct slap_control_ids {
        int sc_postRead;
        int sc_preRead;
        int sc_proxyAuthz;
+       int sc_relax;
        int sc_searchOptions;
 #ifdef SLAP_SORTEDRESULTS
        int sc_sortedResults;
@@ -2466,8 +2466,8 @@ typedef struct slap_op {
 #define o_dontUseCopy                  o_ctrlflag[slap_cids.sc_dontUseCopy]
 #define get_dontUseCopy(op)            _SCM((op)->o_dontUseCopy)
 
-#define o_managedit                            o_ctrlflag[slap_cids.sc_manageDIT]
-#define get_manageDIT(op)              _SCM((op)->o_managedit)
+#define o_relax                                o_ctrlflag[slap_cids.sc_relax]
+#define get_relax(op)          _SCM((op)->o_relax)
 
 #define o_managedsait  o_ctrlflag[slap_cids.sc_manageDSAit]
 #define get_manageDSAit(op)                            _SCM((op)->o_managedsait)
@@ -2775,7 +2775,7 @@ typedef struct slap_counters_t {
 #define SLAP_CTRL_HIDE                         0x80000000U
 #endif
 
-#define SLAP_CTRL_REQUIRES_ROOT                0x40000000U /* for ManageDIT */
+#define SLAP_CTRL_REQUIRES_ROOT                0x40000000U /* for Relax */
 
 #define SLAP_CTRL_GLOBAL                       0x00800000U
 #define SLAP_CTRL_GLOBAL_SEARCH                0x00010000U     /* for NOOP */
index ab75cd67835b06dea1b3c971e2a6f54a2c58bb4c..bdf0e167ea5b3bd0a2ddbdb8c85695220b68a449 100644 (file)
@@ -64,7 +64,7 @@ pblock_get_param_class( int param )
        case SLAPI_DB2LDIF_PRINTKEY:
        case SLAPI_LDIF2DB_REMOVEDUPVALS:
        case SLAPI_MANAGEDSAIT:
-       case SLAPI_X_MANAGEDIT:
+       case SLAPI_X_RELAX:
        case SLAPI_X_OPERATION_NO_SCHEMA_CHECK:
        case SLAPI_IS_REPLICATED_OPERATION:
        case SLAPI_X_CONN_IS_UDP:
@@ -519,9 +519,9 @@ pblock_get( Slapi_PBlock *pb, int param, void **value )
                PBLOCK_ASSERT_OP( pb, 0 );
                *((int *)value) = get_manageDSAit( pb->pb_op );
                break;
-       case SLAPI_X_MANAGEDIT:
+       case SLAPI_X_RELAX:
                PBLOCK_ASSERT_OP( pb, 0 );
-               *((int *)value) = get_manageDIT( pb->pb_op );
+               *((int *)value) = get_relax( pb->pb_op );
                break;
        case SLAPI_BACKEND:
                PBLOCK_ASSERT_OP( pb, 0 );
@@ -924,9 +924,9 @@ pblock_set( Slapi_PBlock *pb, int param, void *value )
                PBLOCK_ASSERT_OP( pb, 0 );
                pb->pb_op->o_managedsait = *((int *)value);
                break;
-       case SLAPI_X_MANAGEDIT:
+       case SLAPI_X_RELAX:
                PBLOCK_ASSERT_OP( pb, 0 );
-               pb->pb_op->o_managedit = *((int *)value);
+               pb->pb_op->o_relax = *((int *)value);
                break;
        case SLAPI_BACKEND:
                PBLOCK_ASSERT_OP( pb, 0 );