fprintf( stderr, _(" b64value\tbase64 encoding of assertion value\n"));
fprintf( stderr, _("Compare options:\n"));
-#ifdef LDAP_CONTROL_DONTUSECOPY
fprintf( stderr, _(" -E [!]<ext>[=<extparam>] compare extensions (! indicates criticality)\n"));
fprintf( stderr, _(" !dontUseCopy (Don't Use Copy)\n"));
-#endif
fprintf( stderr, _(" -z Quiet mode,"
" don't print anything, use return values\n"));
tool_common_usage();
fprintf( stderr, _(" -A retrieve attribute names only (no values)\n"));
fprintf( stderr, _(" -b basedn base dn for search\n"));
fprintf( stderr, _(" -E [!]<ext>[=<extparam>] search extensions (! indicates criticality)\n"));
-#ifdef LDAP_CONTROL_DONTUSECOPY
- fprintf( stderr, _(" !dontUseCopy (Don't Use Copy)\n"));
-#endif
fprintf( stderr, _(" [!]domainScope (domain scope)\n"));
+ fprintf( stderr, _(" !dontUseCopy (Don't Use Copy)\n"));
fprintf( stderr, _(" [!]mv=<filter> (matched values filter)\n"));
fprintf( stderr, _(" [!]pr=<size>[/prompt|noprompt] (paged results/prompt)\n"));
fprintf( stderr, _(" [!]subentries[=true|false] (subentries)\n"));
static SLAP_CTRL_PARSE_FN parsePreRead;
static SLAP_CTRL_PARSE_FN parsePostRead;
static SLAP_CTRL_PARSE_FN parseProxyAuthz;
-#ifdef SLAP_DONTUSECOPY
static SLAP_CTRL_PARSE_FN parseDontUseCopy;
-#endif
#ifdef SLAP_RELAX
static SLAP_CTRL_PARSE_FN parseManageDIT;
#endif
SLAP_CTRL_GLOBAL|SLAP_CTRL_SEARCH|SLAP_CTRL_HIDE,
NULL, NULL,
parseDomainScope, LDAP_SLIST_ENTRY_INITIALIZER(next) },
+ { LDAP_CONTROL_DONTUSECOPY,
+ (int)offsetof(struct slap_control_ids, sc_dontUseCopy),
+ SLAP_CTRL_GLOBAL|SLAP_CTRL_INTROGATE|SLAP_CTRL_HIDE,
+ NULL, NULL,
+ parseDontUseCopy, LDAP_SLIST_ENTRY_INITIALIZER(next) },
{ LDAP_CONTROL_X_PERMISSIVE_MODIFY,
(int)offsetof(struct slap_control_ids, sc_permissiveModify),
SLAP_CTRL_MODIFY|SLAP_CTRL_HIDE,
SLAP_CTRL_ACCESS|SLAP_CTRL_HIDE,
NULL, NULL,
parseNoOp, LDAP_SLIST_ENTRY_INITIALIZER(next) },
-#ifdef SLAP_DONTUSECOPY
- { LDAP_CONTROL_DONTUSECOPY,
- (int)offsetof(struct slap_control_ids, sc_dontUseCopy),
- SLAP_CTRL_GLOBAL|SLAP_CTRL_INTROGATE|SLAP_CTRL_HIDE,
- NULL, NULL,
- parseDontUseCopy, LDAP_SLIST_ENTRY_INITIALIZER(next) },
-#endif
#ifdef SLAP_RELAX
{ LDAP_CONTROL_RELAX,
(int)offsetof(struct slap_control_ids, sc_manageDIT),
return rs->sr_err;
}
-#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 (
exit $RC
fi
+echo "Testing dontUseCopy control..."
+$LDAPSEARCH -C -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT2 \
+ -E \!dontUseCopy \
+ 'sn=jensen' >! $SEARCHOUT
+RC=$?
+if test $RC = 10 ; then
+ echo "ldapsearch failed as expected ($RC)"
+else
+ echo "ldapsearch did not error as expected ($RC)!"
+ test $KILLSERVERS != no && kill -HUP $KILLPIDS
+ exit $RC
+fi
test $KILLSERVERS != no && kill -HUP $KILLPIDS