remove dontusecopy ifdefs

This commit is contained in:
Kurt Zeilenga 2006-08-22 20:57:33 +00:00
parent 49708e1bd5
commit 3d667a4705
5 changed files with 18 additions and 18 deletions

View file

@ -82,10 +82,8 @@ usage( void )
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();

View file

@ -122,10 +122,8 @@ usage( void )
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"));

View file

@ -28,9 +28,7 @@ static SLAP_CTRL_PARSE_FN parseAssert;
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
@ -147,6 +145,11 @@ static struct slap_control control_defs[] = {
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,
@ -174,13 +177,6 @@ static struct slap_control control_defs[] = {
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),
@ -848,7 +844,6 @@ slap_remove_control(
return rs->sr_err;
}
#ifdef SLAP_DONTUSECOPY
static int parseDontUseCopy (
Operation *op,
SlapReply *rs,
@ -872,7 +867,6 @@ static int parseDontUseCopy (
op->o_dontUseCopy = SLAP_CONTROL_CRITICAL;
return LDAP_SUCCESS;
}
#endif
#ifdef SLAP_RELAX
static int parseManageDIT (

View file

@ -67,8 +67,6 @@ LDAP_BEGIN_DECL
#define LDAP_COLLECTIVE_ATTRIBUTES
#define LDAP_COMP_MATCH
#define LDAP_SYNC_TIMESTAMP
#define SLAP_DONTUSECOPY
#define SLAP_SORTEDRESULTS
#endif

View file

@ -145,6 +145,18 @@ if test $RC != 0 ; then
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