N_(" one of \"chainingPreferred\", \"chainingRequired\",\n")
N_(" \"referralsPreferred\", \"referralsRequired\"\n")
#endif /* LDAP_CONTROL_X_CHAINING_BEHAVIOR */
-#ifdef LDAP_DEVEL
-N_(" [!]manageDIT\n")
-#endif
N_(" [!]manageDSAit\n")
N_(" [!]noop\n")
#ifdef LDAP_CONTROL_PASSWORDPOLICYREQUEST
N_(" ppolicy\n")
#endif
N_(" [!]postread[=<attrs>] (a comma-separated attribute list)\n")
-N_(" [!]preread[=<attrs>] (a comma-separated attribute list)\n"),
-N_(" abandon, cancel (SIGINT sends abandon/cancel; not really controls)\n")
+N_(" [!]preread[=<attrs>] (a comma-separated attribute list)\n")
+#ifdef LDAP_DEVEL
+N_(" [!]relax\n")
+#endif
+N_(" abandon, cancel (SIGINT sends abandon/cancel; not really controls)\n"),
N_(" -f file read operations from `file'\n"),
N_(" -h host LDAP server\n"),
N_(" -H URI LDAP Uniform Resource Indentifier(s)\n"),
proxydn = cvalue;
#endif /* LDAP_CONTROL_OBSOLETE_PROXY_AUTHZ */
- } else if ( strcasecmp( control, "manageDIT" ) == 0 ) {
+ } else if ( ( strcasecmp( control, "relax" ) == 0 ) ||
+ ( strcasecmp( control, "manageDIT" ) == 0 ) )
+ {
if( manageDIT ) {
fprintf( stderr,
- "manageDIT control previously specified\n");
+ "relax control previously specified\n");
exit( EXIT_FAILURE );
}
if( cvalue != NULL ) {
fprintf( stderr,
- "manageDIT: no control value expected\n" );
+ "relax: no control value expected\n" );
usage();
}
/* various works in progress */
#define LDAP_CONTROL_NOOP "1.3.6.1.4.1.4203.666.5.2"
#define LDAP_CONTROL_NO_SUBORDINATES "1.3.6.1.4.1.4203.666.5.11"
-#define LDAP_CONTROL_MANAGEDIT "1.3.6.1.4.1.4203.666.5.12"
+#define LDAP_CONTROL_RELAX "1.3.6.1.4.1.4203.666.5.12"
+#define LDAP_CONTROL_MANAGEDIT LDAP_CONTROL_RELAX
#define LDAP_CONTROL_SLURP "1.3.6.1.4.1.4203.666.5.13"
#define LDAP_CONTROL_VALSORT "1.3.6.1.4.1.4203.666.5.14"
#define LDAP_CONTROL_DONTUSECOPY "1.3.6.1.4.1.4203.666.5.15"
snprintf( c->msg, sizeof( c->msg ), "<%s> extra cruft after <%s>",
c->argv[0], Conf->what );
-#ifdef LDAP_DEVEL
ignored = "";
-#endif /* LDAP_DEVEL */
Debug(LDAP_DEBUG_CONFIG, "%s: %s%s.\n",
c->log, c->msg, ignored );
-#ifdef LDAP_DEVEL
return(ARG_BAD_CONF);
-#endif /* LDAP_DEVEL */
}
if((arg_syn & ARG_DB) && !c->be) {
snprintf( c->msg, sizeof( c->msg ), "<%s> only allowed within database declaration",
static SLAP_CTRL_PARSE_FN parsePreRead;
static SLAP_CTRL_PARSE_FN parsePostRead;
static SLAP_CTRL_PARSE_FN parseProxyAuthz;
-#ifdef LDAP_DEVEL
+#ifdef SLAP_DONTUSECOPY
static SLAP_CTRL_PARSE_FN parseDontUseCopy;
+#endif
+#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;
-#ifdef LDAP_DEVEL
+#ifdef SLAP_SORTEDRESULTS
static SLAP_CTRL_PARSE_FN parseSortedResults;
#endif
static SLAP_CTRL_PARSE_FN parseValuesReturnFilter;
SLAP_CTRL_SEARCH,
NULL, NULL,
parsePagedResults, LDAP_SLIST_ENTRY_INITIALIZER(next) },
-#ifdef LDAP_DEVEL
+#ifdef SLAP_SORTEDRESULTS
{ LDAP_CONTROL_SORTREQUEST,
(int)offsetof(struct slap_control_ids, sc_sortedResults),
SLAP_CTRL_GLOBAL|SLAP_CTRL_SEARCH|SLAP_CTRL_HIDE,
SLAP_CTRL_ACCESS|SLAP_CTRL_HIDE,
NULL, NULL,
parseNoOp, LDAP_SLIST_ENTRY_INITIALIZER(next) },
-#ifdef LDAP_DEVEL
+#ifdef SLAP_DONTUSECOPY
{ LDAP_CONTROL_DONTUSECOPY,
(int)offsetof(struct slap_control_ids, sc_dontUseCopy),
SLAP_CTRL_INTROGATE|SLAP_CTRL_HIDE,
NULL, NULL,
parseDontUseCopy, LDAP_SLIST_ENTRY_INITIALIZER(next) },
- { LDAP_CONTROL_MANAGEDIT,
+#endif
+#ifdef SLAP_RELAX
+ { LDAP_CONTROL_RELAX,
(int)offsetof(struct slap_control_ids, sc_manageDIT),
SLAP_CTRL_GLOBAL|SLAP_CTRL_UPDATE|SLAP_CTRL_HIDE,
NULL, NULL,
return rs->sr_err;
}
-#ifdef LDAP_DEVEL
+#ifdef SLAP_DONTUSECOPY
static int parseDontUseCopy (
Operation *op,
SlapReply *rs,
op->o_dontUseCopy = SLAP_CONTROL_CRITICAL;
return LDAP_SUCCESS;
}
+#endif
+#ifdef SLAP_RELAX
static int parseManageDIT (
Operation *op,
SlapReply *rs,
LDAPControl *ctrl )
{
if ( op->o_managedit != SLAP_CONTROL_NONE ) {
- rs->sr_text = "manageDIT control specified multiple times";
+ rs->sr_text = "relax control specified multiple times";
return LDAP_PROTOCOL_ERROR;
}
if ( ctrl->ldctl_value.bv_len ) {
- rs->sr_text = "manageDIT control value not empty";
+ rs->sr_text = "relax control value not empty";
return LDAP_PROTOCOL_ERROR;
}
return rc;
}
-#ifdef LDAP_DEVEL
+#ifdef SLAP_SORTEDRESULTS
static int parseSortedResults (
Operation *op,
SlapReply *rs,
if( rc == -1 ) return rc;
}
-#ifdef LDAP_DEVEL
+#ifdef SLAP_SORTED_RESULTS
/* this is a hack to avoid having to modify op->s_ctrls */
if( o->o_sortedresults ) {
BerElementBuffer berbuf;
{
int rc;
-#ifdef LDAP_DEVEL
slap_callback *sc = op->o_callback, **scp;
rc = SLAP_CB_CONTINUE;
}
op->o_callback = sc;
-#else /* ! LDAP_DEVEL */
- slap_callback *sc = op->o_callback, **sc_prev = &sc, *sc_next;
-
- rc = SLAP_CB_CONTINUE;
- for ( sc_next = op->o_callback; sc_next; op->o_callback = sc_next) {
- sc_next = op->o_callback->sc_next;
- if ( op->o_callback->sc_response ) {
- slap_callback *sc2 = op->o_callback;
- rc = op->o_callback->sc_response( op, rs );
- if ( op->o_callback != sc2 ) {
- *sc_prev = op->o_callback;
- }
- if ( rc != SLAP_CB_CONTINUE || !op->o_callback ) break;
- if ( op->o_callback != sc2 ) continue;
- }
- sc_prev = &op->o_callback->sc_next;
- }
-
- op->o_callback = sc;
-#endif /* ! LDAP_DEVEL */
-
return rc;
}
Operation *op,
SlapReply *rs )
{
-#ifdef LDAP_DEVEL
slap_callback *sc = op->o_callback, **scp;
for ( scp = ≻ *scp; ) {
}
op->o_callback = sc;
-#else /* ! LDAP_DEVEL */
- slap_callback *sc = op->o_callback, **sc_prev = &sc, *sc_next;
-
- for ( sc_next = op->o_callback; sc_next; op->o_callback = sc_next) {
- sc_next = op->o_callback->sc_next;
- if ( op->o_callback->sc_cleanup ) {
- slap_callback *sc2 = op->o_callback;
- (void)op->o_callback->sc_cleanup( op, rs );
- if ( op->o_callback != sc2 ) {
- *sc_prev = op->o_callback;
- }
- if ( !op->o_callback ) break;
- if ( op->o_callback != sc2 ) continue;
- }
- sc_prev = &op->o_callback->sc_next;
- }
-
- op->o_callback = sc;
-#endif /* ! LDAP_DEVEL */
-
return LDAP_SUCCESS;
}
#define LDAP_COLLECTIVE_ATTRIBUTES
#define LDAP_COMP_MATCH
#define LDAP_SYNC_TIMESTAMP
+
+#define SLAP_DONTUSECOPY
+#define SLAP_SORTEDRESULTS
#endif
+#define SLAP_RELAX
#define LDAP_DYNAMIC_OBJECTS
#define SLAP_CONTROL_X_TREE_DELETE LDAP_CONTROL_X_TREE_DELETE
#define SLAP_DISTPROC
int sc_preRead;
int sc_proxyAuthz;
int sc_searchOptions;
-#ifdef LDAP_DEVEL
+#ifdef SLAP_SORTEDRESULTS
int sc_sortedResults;
#endif
int sc_subentries;
#define o_pagedresults_state o_controls[slap_cids.sc_pagedResults]
#define get_pagedresults(op) ((int)(op)->o_pagedresults)
-#ifdef LDAP_DEVEL
+#ifdef SLAP_SORTEDRESULTS
#define o_sortedresults o_ctrlflag[slap_cids.sc_sortedResults]
#endif
fi
echo "Using ldapadd to populate the database..."
-# may need -e manageDIT for draft 09, but not yet.
+# may need "-e relax" for draft 09, but not yet.
$LDAPADD -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD < \
$LDIFPPOLICY > $TESTOUT 2>&1
RC=$?
exit $RC
fi
-# ITS#3898: #ifndef LDAP_DEVEL, the control is not available
-MANAGEDITOID="1.3.6.1.4.1.4203.666.5.12"
-case `$LDAPSEARCH -s base -b "" -h $LOCALHOST -p $PORT1 \
- '(supportedControl:objectIdentifierMatch:='${MANAGEDITOID}')' \
- supportedControl | grep "supportedControl: ${MANAGEDITOID}"` in
-"supportedControl: ${MANAGEDITOID}")
- ;;
-*)
- echo "The \"manageDIT\" control appears to be unsupported; test disabled"
- test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit 0
- ;;
-esac
-
echo "Testing modify, add, and delete..."
$LDAPMODIFY -v -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD \
- -e \!manageDIT > \
+ -e \!relax > \
$TESTOUT 2>&1 << EOMODS
version: 1
#
echo "Testing modify, add, and delete..."
$LDAPMODIFY -v -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD \
- -e \!manageDIT > \
+ -e \!relax > \
$TESTOUT 2>&1 << EOMODS
version: 1
#