#ifdef LDAP_CONTROL_SUBENTRIES
fprintf( stderr, _(" [!]subentries[=true|false] (subentries)\n"));
#endif
-#ifdef LDAP_CLIENT_UPDATE
- fprintf( stderr, _(" [!]lcup=p/<cint>/<cookie>/<slimit> (LDAP client update)\n"));
-/*
- * " s/<cint>/<cookie> (LDAP client update)\n"
- * " sp/<cint>/<cookie>/<slimit>\n"
- * */
-#endif
#ifdef LDAP_SYNC
fprintf( stderr, _(" [!]sync=ro[/<cookie>] (LDAP Sync refreshOnly)\n"));
fprintf( stderr, _(" rp[/<cookie>][/<slimit>] (LDAP Sync refreshAndPersist)\n"));
static int domainScope = 0;
#endif
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
-static int lcup = 0;
-static int ldapsync = 0;
-#endif
-
-#ifdef LDAP_CLIENT_UPDATE
-static int lcup_cint = 0;
-static struct berval lcup_cookie = { 0, NULL };
-static int lcup_slimit = -1;
-#endif
-
#ifdef LDAP_SYNC
+static int ldapsync = 0;
static struct berval sync_cookie = { 0, NULL };
static int sync_slimit = -1;
#endif
if( crit ) subentries *= -1;
#endif
-#ifdef LDAP_CLIENT_UPDATE
- } else if ( strcasecmp( control, "lcup" ) == 0 ) {
- char *cookiep;
- char *slimitp;
- if ( lcup ) {
- fprintf( stderr, _("client update control previously specified\n"));
- exit( EXIT_FAILURE );
- }
- if ( ldapsync != -1 ) {
- fprintf( stderr, _("ldap sync control previously specified\n"));
- exit( EXIT_FAILURE );
- }
- if ( cvalue == NULL ) {
- fprintf( stderr,
- _("missing specification of client update control\n"));
- exit( EXIT_FAILURE );
- }
- if ( strncasecmp( cvalue, "p", 1 ) == 0 ) {
- lcup = LDAP_CUP_PERSIST_ONLY;
- cvalue = strchr( cvalue, '/' );
- cvalue++;
- cookiep = strchr( cvalue, '/' );
- *cookiep++ = '\0';
- lcup_cint = atoi( cvalue );
- cvalue = cookiep;
- slimitp = strchr( cvalue, '/' );
- *slimitp++ = '\0';
- while ( isspace( (unsigned char) *cookiep ) )
- cookiep++;
- ber_str2bv( cookiep, 0, 0, &lcup_cookie );
- lcup_slimit = atoi( slimitp );
-/*
- } else if ( strncasecmp( cvalue, "s", 1 ) == 0 ) {
- lcup = LDAP_CUP_SYNC_ONLY;
- cvalue += 2;
- cookiep = strchr( cvalue, '/' );
- *cookiep++ = '\0';
- lcup_cint = atoi( cvalue );
- ber_str2bv( cookiep, 0, 0, &lcup_cookie );
- } else if ( strncasecmp( cvalue, "sp", 2 ) == 0 ) {
- lcup = LDAP_CUP_SYNC_AND_PERSIST;
- cvalue += 3;
- cookiep = strchr( cvalue, '/' );
- *cookiep++ = '\0';
- lcup_cint = atoi( cvalue );
- cvalue = cookiep;
- slimitp = strchr( cvalue, '/' );
- *slimitp++ = '\0';
- ber_str2bv( cookiep, 0, 0, &lcup_cookie );
- lcup_slimit = atoi( slimitp );
-*/
- } else {
- fprintf( stderr,
- _("client update control value \"%s\" invalid\n"),
- cvalue );
- exit( EXIT_FAILURE );
- }
- if ( crit ) lcup *= -1;
-#endif
-
#ifdef LDAP_SYNC
} else if ( strcasecmp( control, "sync" ) == 0 ) {
char *cookiep;
fprintf( stderr, _("ldap sync control previously specified\n") );
exit( EXIT_FAILURE );
}
- if ( lcup ) {
- fprintf( stderr, _("client update control previously specified\n") );
- exit( EXIT_FAILURE );
- }
if ( cvalue == NULL ) {
fprintf( stderr,
_("missing specification of ldap sync control\n"));
int rc, i, first;
LDAP *ld = NULL;
BerElement *seber = NULL, *vrber = NULL, *prber = NULL;
-#ifdef LDAP_CLIENT_UPDATE
- BerElement *cuber = NULL;
- struct berval *cubvalp = NULL;
-#endif
#ifdef LDAP_SYNC
BerElement *syncber = NULL;
#ifdef LDAP_CONTROL_PAGEDRESULTS
|| pageSize
#endif
-#ifdef LDAP_CLIENT_UPDATE
- || lcup
-#endif
#ifdef LDAP_SYNC
|| ldapsync
#endif
}
#endif
-#ifdef LDAP_CLIENT_UPDATE
- if ( lcup ) {
- if (( cuber = ber_alloc_t(LBER_USE_DER)) == NULL ) {
- return EXIT_FAILURE;
- }
-
- if ( lcup_cookie.bv_len == 0 ) {
- err = ber_printf( cuber, "{ei}", abs(lcup), lcup_cint );
- } else {
- err = ber_printf( cuber, "{ei{sO}}", abs(lcup), lcup_cint,
- LDAP_CUP_COOKIE_OID, &lcup_cookie );
- }
-
- if ( err == LBER_ERROR ) {
- ber_free( cuber, 1 );
- fprintf( stderr, _("client update control encoding error!\n") );
- return EXIT_FAILURE;
- }
-
- if ( ber_flatten( cuber, &cubvalp ) == LBER_ERROR ) {
- return EXIT_FAILURE;
- }
-
- c[i].ldctl_oid = LDAP_CONTROL_CLIENT_UPDATE;
- c[i].ldctl_value = (*cubvalp);
- c[i].ldctl_iscritical = lcup < 0;
- i++;
- }
-#endif
-
#ifdef LDAP_SYNC
if ( ldapsync ) {
if (( syncber = ber_alloc_t(LBER_USE_DER)) == NULL ) {
}
#endif
-#ifdef LDAP_CLIENT_UPDATE
- if ( lcup == LDAP_CUP_PERSIST_ONLY ||
- lcup == LDAP_CUP_SYNC_AND_PERSIST ) {
- break;
- }
-#endif
-#if defined(LDAP_CLIENT_UPDATE) && defined(LDAP_SYNC)
- else
-#endif
#ifdef LDAP_SYNC
if ( ldapsync == LDAP_SYNC_REFRESH_AND_PERSIST ) {
break;
#endif
}
-#ifdef LDAP_CLIENT_UPDATE
- if ( lcup && lcup_slimit != -1 && nresponses >= lcup_slimit ) {
- ldap_abandon (ld, ldap_msgid(msg));
- goto done;
- }
-#endif
#ifdef LDAP_SYNC
if ( ldapsync && sync_slimit != -1 &&
nresponses_psearch >= sync_slimit ) {
#define LDAP_CONTROL_PAGEDRESULTS "1.2.840.113556.1.4.319"
-#ifdef LDAP_CLIENT_UPDATE
-#define LDAP_CONTROL_CLIENT_UPDATE "1.3.6.1.4.1.4203.666.5.3"
-#define LDAP_CONTROL_ENTRY_UPDATE "1.3.6.1.4.1.4203.666.5.4"
-#define LDAP_CONTROL_CLIENT_UPDATE_DONE "1.3.6.1.4.1.4203.666.5.5"
-#define LDAP_CUP_COOKIE_OID "1.3.6.1.4.1.4203.666.10.1"
-#endif
-
#define LDAP_SYNC 2
#ifdef LDAP_SYNC
#define LDAP_SYNCREPL 1
#define LDAP_TAG_SASL_RES_CREDS ((ber_tag_t) 0x87U) /* context specific + primitive */
-#ifdef LDAP_CLIENT_UPDATE
-#define LDAP_CUP_TAG_INTERVAL ((ber_tag_t) 0x02U) /* integer */
-#define LDAP_CUP_TAG_COOKIE ((ber_tag_t) 0x30U) /* sequence */
-#endif
-
#ifdef LDAP_SYNC
#define LDAP_SYNC_TAG_COOKIE ((ber_tag_t) 0x04U) /* octet string */
#endif
#define LDAP_CLIENT_LOOP 0x60 /* draft-ietf-ldap-c-api-xx */
#define LDAP_REFERRAL_LIMIT_EXCEEDED 0x61 /* draft-ietf-ldap-c-api-xx */
-#ifdef LDAP_CLIENT_UPDATE
-/* resultCode for LCUP */
-#define LDAP_CUP_RESOURCES_EXHAUSTED 0x100
-#define LDAP_CUP_SECURITY_VIOLATION 0x101
-#define LDAP_CUP_INVALID_COOKIE 0x102
-#define LDAP_CUP_UNSUPPORTED_SCHEME 0x103
-#define LDAP_CUP_CLIENT_DISCONNECT 0x104
-#define LDAP_CUP_RELOAD_REQUIRED 0x105
+#ifdef LDAP_SYNC
+#define LDAP_SYNC_RESOURCES_EXHAUSTED 0x100
+#define LDAP_SYNC_SECURITY_VIOLATION 0x101
+#define LDAP_SYNC_INVALID_COOKIE 0x102
+#define LDAP_SYNC_UNSUPPORTED_SCHEME 0x103
+#define LDAP_SYNC_CLIENT_DISCONNECT 0x104
+#define LDAP_SYNC_RELOAD_REQUIRED 0x105
#endif
#define LDAP_ASSERTION_FAILED 0x10f
#define LDAP_CANNOT_CANCEL 0x113
#endif
-#ifdef LDAP_CLIENT_UPDATE
-/* LCUP update type */
-#define LDAP_CUP_NONE 0x00
-#define LDAP_CUP_SYNC_ONLY 0x01
-#define LDAP_CUP_PERSIST_ONLY 0x02
-#define LDAP_CUP_SYNC_AND_PERSIST 0x03
-
-/* LCUP default cookie interval */
-#define LDAP_CUP_DEFAULT_SEND_COOKIE_INTERVAL 0x01
-#endif /* LDAP_CLIENT_UPDATE */
-
/* LDAP SYNC request type */
#ifdef LDAP_SYNC
#define LDAP_SYNC_NONE 0x00
{LDAP_ASSERTION_FAILED, N_("Assertion Failed")},
-#ifdef LDAP_CLIENT_UPDATE
- {LDAP_CUP_RESOURCES_EXHAUSTED, N_("Client Update Resource Exhausted")},
- {LDAP_CUP_SECURITY_VIOLATION, N_("Client Update Security Violation")},
- {LDAP_CUP_INVALID_COOKIE, N_("Client Update Invalid Cookie")},
- {LDAP_CUP_UNSUPPORTED_SCHEME, N_("Client Update Unsupported Scheme")},
- {LDAP_CUP_CLIENT_DISCONNECT, N_("Client Update Client Disconnect")},
- {LDAP_CUP_RELOAD_REQUIRED, N_("Client Update Reload Required")},
+#ifdef LDAP_SYNC
+ {LDAP_SYNC_RESOURCES_EXHAUSTED, N_("Content Sync Resource Exhausted")},
+ {LDAP_SYNC_SECURITY_VIOLATION, N_("Content Sync Security Violation")},
+ {LDAP_SYNC_INVALID_COOKIE, N_("Content Sync Invalid Cookie")},
+ {LDAP_SYNC_UNSUPPORTED_SCHEME, N_("Content Sync Unsupported Scheme")},
+ {LDAP_SYNC_CLIENT_DISCONNECT, N_("Content Sync Client Disconnect")},
+ {LDAP_SYNC_RELOAD_REQUIRED, N_("Content Sync Reload Required")},
#endif
#ifdef LDAP_EXOP_X_CANCEL
DB_LOCK lock;
int noop = 0;
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
+#ifdef LDAP_SYNC
Operation* ps_list;
#endif
return_results:
send_ldap_result( op, rs );
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
+#ifdef LDAP_SYNC
if ( rs->sr_err == LDAP_SUCCESS && !noop ) {
LDAP_LIST_FOREACH ( ps_list, &bdb->bi_psearch_list, o_ps_link ) {
bdb_psearch( op, rs, ps_list, op->oq_add.rs_e, LDAP_PSEARCH_BY_ADD );
}
}
-#endif /* LDAP_CLIENT_UPDATE */
+#endif
if( rs->sr_err == LDAP_SUCCESS && bdb->bi_txn_cp ) {
ldap_pvt_thread_yield();
ID bi_lastid;
ldap_pvt_thread_mutex_t bi_lastid_mutex;
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
+#ifdef LDAP_SYNC
LDAP_LIST_HEAD(pl, slap_op) bi_psearch_list;
#endif
#ifdef SLAP_IDL_CACHE
int noop = 0;
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
+#ifdef LDAP_SYNC
Operation* ps_list;
#endif
return_results:
send_ldap_result( op, rs );
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
+#ifdef LDAP_SYNC
if ( rs->sr_err == LDAP_SUCCESS && !noop ) {
LDAP_LIST_FOREACH( ps_list, &bdb->bi_psearch_list, o_ps_link ) {
bdb_psearch( op, rs, ps_list, e, LDAP_PSEARCH_BY_DELETE );
bdb->bi_search_stack_depth = DEFAULT_SEARCH_STACK_DEPTH;
bdb->bi_search_stack = NULL;
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
+#ifdef LDAP_SYNC
LDAP_LIST_INIT (&bdb->bi_psearch_list);
#endif
{
static char *controls[] = {
LDAP_CONTROL_ASSERT,
-#ifdef LDAP_CLIENT_UPDATE
- LDAP_CONTROL_CLIENT_UPDATE,
-#endif
LDAP_CONTROL_MANAGEDSAIT,
LDAP_CONTROL_NOOP,
#ifdef LDAP_CONTROL_PAGEDRESULTS
bi->bi_op_unbind = 0;
-#ifdef LDAP_CLIENT_UPDATE
+#ifdef LDAP_SYNC
bi->bi_op_abandon = bdb_abandon;
bi->bi_op_cancel = bdb_cancel;
#else
int noop = 0;
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
+#ifdef LDAP_SYNC
Operation* ps_list;
struct psid_entry *pm_list, *pm_prev;
#endif
"bdb_modify: retrying...\n", 0, 0, 0);
#endif
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
+#ifdef LDAP_SYNC
pm_list = LDAP_LIST_FIRST(&op->o_pm_list);
while ( pm_list != NULL ) {
LDAP_LIST_REMOVE ( pm_list, ps_link );
goto return_results;
}
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
+#ifdef LDAP_SYNC
if ( rs->sr_err == LDAP_SUCCESS && !op->o_noop ) {
LDAP_LIST_FOREACH ( ps_list, &bdb->bi_psearch_list, o_ps_link ) {
bdb_psearch(op, rs, ps_list, e, LDAP_PSEARCH_BY_PREMODIFY );
return_results:
send_ldap_result( op, rs );
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
+#ifdef LDAP_SYNC
if ( rs->sr_err == LDAP_SUCCESS && !op->o_noop ) {
/* Loop through in-scope entries for each psearch spec */
LDAP_LIST_FOREACH ( ps_list, &bdb->bi_psearch_list, o_ps_link ) {
done:
if( ltid != NULL ) {
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
+#ifdef LDAP_SYNC
pm_list = LDAP_LIST_FIRST(&op->o_pm_list);
while ( pm_list != NULL ) {
LDAP_LIST_REMOVE ( pm_list, ps_link );
int noop = 0;
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
+#ifdef LDAP_SYNC
Operation *ps_list;
struct psid_entry *pm_list, *pm_prev;
#endif
Debug( LDAP_DEBUG_TRACE, "==>bdb_modrdn: retrying...\n", 0, 0, 0 );
#endif
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
+#ifdef LDAP_SYNC
pm_list = LDAP_LIST_FIRST(&op->o_pm_list);
while ( pm_list != NULL ) {
LDAP_LIST_REMOVE ( pm_list, ps_link );
goto return_results;
}
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
+#ifdef LDAP_SYNC
if ( rs->sr_err == LDAP_SUCCESS && !op->o_noop ) {
LDAP_LIST_FOREACH ( ps_list, &bdb->bi_psearch_list, o_ps_link ) {
bdb_psearch( op, rs, ps_list, e, LDAP_PSEARCH_BY_PREMODIFY );
return_results:
send_ldap_result( op, rs );
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
+#ifdef LDAP_SYNC
if ( rs->sr_err == LDAP_SUCCESS && !op->o_noop ) {
/* Loop through in-scope entries for each psearch spec */
LDAP_LIST_FOREACH ( ps_list, &bdb->bi_psearch_list, o_ps_link ) {
}
if( ltid != NULL ) {
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
+#ifdef LDAP_SYNC
pm_list = LDAP_LIST_FIRST(&op->o_pm_list);
while ( pm_list != NULL ) {
LDAP_LIST_REMOVE ( pm_list, ps_link );
* search.c
*/
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
+#ifdef LDAP_SYNC
#define bdb_abandon BDB_SYMBOL(abandon)
#define bdb_cancel BDB_SYMBOL(cancel)
#endif
-#ifdef LDAP_CLIENT_UPDATE
-#define bdb_build_lcup_update_ctrl BDB_SYMBOL(build_lcup_update_ctrl)
-#define bdb_build_lcup_done_ctrl BDB_SYMBOL(build_lcup_done_ctrl)
-
-int
-bdb_build_lcup_update_ctrl(
- Operation *op,
- SlapReply *rs,
- Entry *e,
- int entry_count,
- LDAPControl **ctrls,
- int num_ctrls,
- struct berval *latest_entrycsn_bv,
- int isdeleted );
-
-int
-bdb_build_lcup_done_ctrl(
- Operation *op,
- SlapReply *rs,
- LDAPControl **ctrls,
- int num_ctrls,
- struct berval *latest_entrycsn_bv );
-#endif
-
#ifdef LDAP_SYNC
#define bdb_build_sync_state_ctrl BDB_SYMBOL(build_sync_state_ctrl)
#define bdb_build_sync_done_ctrl BDB_SYMBOL(build_sync_done_ctrl)
static
int is_sync_protocol( Operation *op )
{
-#if !defined(LDAP_CLIENT_UPDATE) && !defined(LDAP_SYNC)
+#if !defined(LDAP_SYNC)
return 0;
#endif
-#ifdef LDAP_CLIENT_UPDATE
- if ( op->o_clientupdate_type & SLAP_LCUP_SYNC_AND_PERSIST )
- return 1;
-#endif
#ifdef LDAP_SYNC
if ( op->o_sync_mode & SLAP_SYNC_REFRESH_AND_PERSIST )
return 1;
return 0;
}
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
+#if defined(LDAP_SYNC)
#define IS_BDB_REPLACE(type) (( type == LDAP_PSEARCH_BY_DELETE ) || \
( type == LDAP_PSEARCH_BY_SCOPEOUT ))
#define IS_PSEARCH (op != sop)
ID lastid = NOID;
AttributeName *attrs;
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
+#ifdef LDAP_SYNC
Filter cookief, csnfnot, csnfeq, csnfand, csnfge;
AttributeAssertion aa_ge, aa_eq;
int entry_count = 0;
LDAPControl *ctrls[SLAP_SEARCH_MAX_CTRLS];
int num_ctrls = 0;
AttributeName uuid_attr[2];
-#ifdef LDAP_SYNC
int rc_sync = 0;
int entry_sync_state = -1;
AttributeName null_attr;
-#endif
#endif
struct slap_limits_set *limit = NULL;
int isroot = 0;
#endif
attrs = sop->oq_search.rs_attrs;
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
-#ifdef LDAP_CLIENT_UPDATE
- if ( !IS_PSEARCH && sop->o_clientupdate_type & SLAP_LCUP_PERSIST ) {
- sop->o_ps_protocol = LDAP_CLIENT_UPDATE;
- LDAP_LIST_INSERT_HEAD( &bdb->bi_psearch_list, sop, o_ps_link );
- return LDAP_SUCCESS;
- }
-#endif
#ifdef LDAP_SYNC
/* psearch needs to be registered before refresh begins */
/* psearch and refresh transmission is serialized in send_ldap_ber() */
null_attr.an_oc = NULL;
null_attr.an_name.bv_len = 0;
null_attr.an_name.bv_val = NULL;
-#endif
for ( num_ctrls = 0; num_ctrls < SLAP_SEARCH_MAX_CTRLS; num_ctrls++ ) {
ctrls[num_ctrls] = NULL;
num_ctrls = 0;
if ( IS_PSEARCH && IS_BDB_REPLACE(ps_type)) {
-#ifdef LDAP_CLIENT_UPDATE
- if ( sop->o_ps_protocol == LDAP_CLIENT_UPDATE ) {
- attrs = uuid_attr;
- attrs[0].an_desc = slap_schema.si_ad_entryUUID;
- attrs[0].an_oc = NULL;
- attrs[0].an_name = attrs[0].an_desc->ad_cname;
- attrs[1].an_desc = NULL;
- attrs[1].an_oc = NULL;
- attrs[1].an_name.bv_len = 0;
- attrs[1].an_name.bv_val = NULL;
- } else
-#endif
-#ifdef LDAP_SYNC
if (sop->o_ps_protocol == LDAP_SYNC ) {
attrs = uuid_attr;
attrs[0].an_desc = NULL;
attrs[0].an_name.bv_len = 0;
attrs[0].an_name.bv_val = NULL;
} else
-#endif
{
rs->sr_err = 1;
goto done;
manageDSAit = get_manageDSAit( sop );
- /* Sync / LCUP controls override manageDSAit */
+ /* Sync control overrides manageDSAit */
-#ifdef LDAP_CLIENT_UPDATE
- if ( !IS_PSEARCH && sop->o_clientupdate_type & SLAP_LCUP_SYNC ) {
- if ( manageDSAit == SLAP_NO_CONTROL )
- manageDSAit = SLAP_CRITICAL_CONTROL;
- } else
-#endif
#ifdef LDAP_SYNC
if ( !IS_PSEARCH && sop->o_sync_mode & SLAP_SYNC_REFRESH ) {
if ( manageDSAit == SLAP_NO_CONTROL )
/* start cursor at beginning of candidates.
*/
cursor = 0;
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
+#ifdef LDAP_SYNC
if (IS_PSEARCH) {
if ( !BDB_IDL_IS_RANGE( candidates ) ) {
cursor = bdb_idl_search( candidates, ps_e->e_id );
}
#endif
-#ifdef LDAP_CLIENT_UPDATE
- if ( (sop->o_clientupdate_type & SLAP_LCUP_SYNC) ||
- (IS_PSEARCH && sop->o_ps_protocol == LDAP_CLIENT_UPDATE ))
- {
- cookief.f_choice = LDAP_FILTER_AND;
- cookief.f_and = &csnfnot;
- cookief.f_next = NULL;
-
- csnfnot.f_choice = LDAP_FILTER_NOT;
- csnfnot.f_not = &csnfeq;
- csnfnot.f_next = &csnfand;
-
- csnfeq.f_choice = LDAP_FILTER_EQUALITY;
- csnfeq.f_ava = &aa_eq;
- csnfeq.f_av_desc = slap_schema.si_ad_entryCSN;
- csnfeq.f_av_value = sop->o_clientupdate_state;
-
- csnfand.f_choice = LDAP_FILTER_AND;
- csnfand.f_and = &csnfge;
- csnfand.f_next = NULL;
-
- csnfge.f_choice = LDAP_FILTER_GE;
- csnfge.f_ava = &aa_ge;
- csnfge.f_av_desc = slap_schema.si_ad_entryCSN;
- csnfge.f_av_value = sop->o_clientupdate_state;
- csnfge.f_next = sop->oq_search.rs_filter;
- }
-#endif
-#if defined(LDAP_CLIENT_UPDATE) && defined(LDAP_SYNC)
- else
-#endif
#ifdef LDAP_SYNC
if ( (sop->o_sync_mode & SLAP_SYNC_REFRESH) ||
( IS_PSEARCH && sop->o_ps_protocol == LDAP_SYNC ))
}
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
+#ifdef LDAP_SYNC
if (!IS_PSEARCH) {
#endif
id2entry_retry:
goto loop_continue;
}
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
+#ifdef LDAP_SYNC
} else {
e = ps_e;
}
#endif
/* if it matches the filter and scope, send it */
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
+#ifdef LDAP_SYNC
if (IS_PSEARCH) {
if (ps_type != LDAP_PSEARCH_BY_SCOPEOUT) {
rs->sr_err = test_filter( sop, rs->sr_entry, &cookief );
rs->sr_err = LDAP_COMPARE_TRUE;
}
} else {
-#ifdef LDAP_CLIENT_UPDATE
- if ( sop->o_clientupdate_type & SLAP_LCUP_SYNC ) {
- rs->sr_err = test_filter( sop, rs->sr_entry, &cookief );
- } else
-#endif
-#ifdef LDAP_SYNC
if ( sop->o_sync_mode & SLAP_SYNC_REFRESH ) {
rc_sync = test_filter( sop, rs->sr_entry, &cookief );
rs->sr_err = test_filter( sop,
}
}
} else
-#endif
#endif
{
rs->sr_err = test_filter( sop,
rs->sr_entry, sop->oq_search.rs_filter );
}
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
+#ifdef LDAP_SYNC
}
#endif
if ( rs->sr_err == LDAP_COMPARE_TRUE ) {
/* check size limit */
if ( --sop->oq_search.rs_slimit == -1 ) {
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
+#ifdef LDAP_SYNC
if (!IS_PSEARCH)
#endif
bdb_cache_return_entry_r( bdb->bi_dbenv,
result = 0;
} else
#endif
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
- if (IS_PSEARCH) {
#ifdef LDAP_SYNC
+ if (IS_PSEARCH) {
int premodify_found = 0;
int entry_sync_state;
-#endif
if ( ps_type == LDAP_PSEARCH_BY_ADD ||
ps_type == LDAP_PSEARCH_BY_DELETE ||
&op->o_pm_list, ps_link)
{
if( psid_e->ps_op == sop ) {
-#ifdef LDAP_SYNC
premodify_found = 1;
-#endif
LDAP_LIST_REMOVE(psid_e, ps_link);
break;
}
}
if (psid_e != NULL) free (psid_e);
}
-#ifdef LDAP_SYNC
if ( ps_type == LDAP_PSEARCH_BY_ADD ) {
entry_sync_state = LDAP_SYNC_ADD;
} else if ( ps_type == LDAP_PSEARCH_BY_DELETE ) {
rs->sr_err = 1;
goto done;
}
-#endif
-
-#ifdef LDAP_CLIENT_UPDATE
- if ( sop->o_ps_protocol == LDAP_CLIENT_UPDATE ) {
- int entry_count = ++sop->o_ps_entries;
- if ( IS_BDB_REPLACE(ps_type) ) {
- rs->sr_err = bdb_build_lcup_update_ctrl( sop,
- rs, e, entry_count, ctrls,
- num_ctrls++, &latest_entrycsn_bv,
- SLAP_LCUP_ENTRY_DELETED_TRUE );
- } else {
- rs->sr_err = bdb_build_lcup_update_ctrl( sop,
- rs, e, entry_count, ctrls,
- num_ctrls++, &latest_entrycsn_bv,
- SLAP_LCUP_ENTRY_DELETED_FALSE );
- }
- if ( rs->sr_err != LDAP_SUCCESS ) goto done;
- rs->sr_attrs = attrs;
- rs->sr_ctrls = ctrls;
- result = send_search_entry( sop, rs );
- ch_free( ctrls[num_ctrls-1]->ldctl_value.bv_val );
- ch_free( ctrls[--num_ctrls] );
- ctrls[num_ctrls] = NULL;
- rs->sr_ctrls = NULL;
- } else
-#endif
-#ifdef LDAP_SYNC
if ( sop->o_ps_protocol == LDAP_SYNC ) {
rs->sr_err = bdb_build_sync_state_ctrl( sop,
rs, e, entry_sync_state, ctrls,
ctrls[num_ctrls] = NULL;
rs->sr_ctrls = NULL;
} else
-#endif
{
rs->sr_err = 1;
goto done;
printf("Error !\n");
}
} else {
-#ifdef LDAP_CLIENT_UPDATE
- if ( sop->o_clientupdate_type & SLAP_LCUP_SYNC ) {
- rs->sr_err = bdb_build_lcup_update_ctrl( sop,
- rs, e, ++entry_count, ctrls,
- num_ctrls++, &latest_entrycsn_bv,
- SLAP_LCUP_ENTRY_DELETED_FALSE );
- if ( rs->sr_err != LDAP_SUCCESS ) goto done;
- rs->sr_ctrls = ctrls;
- rs->sr_attrs = sop->oq_search.rs_attrs;
- result = send_search_entry( sop, rs );
- ch_free( ctrls[num_ctrls-1]->ldctl_value.bv_val );
- ch_free( ctrls[--num_ctrls] );
- ctrls[num_ctrls] = NULL;
- rs->sr_ctrls = NULL;
- } else
-#endif
-#ifdef LDAP_SYNC
if ( sop->o_sync_mode & SLAP_SYNC_REFRESH ) {
rs->sr_err = bdb_build_sync_state_ctrl( sop,
rs, e, entry_sync_state, ctrls,
ctrls[num_ctrls] = NULL;
rs->sr_ctrls = NULL;
} else
-#endif
#endif
{
rs->sr_attrs = sop->oq_search.rs_attrs;
}
if (!IS_PSEARCH) {
-#ifdef LDAP_CLIENT_UPDATE
- if ( sop->o_clientupdate_type & SLAP_LCUP_SYNC ) {
- bdb_build_lcup_done_ctrl( sop, rs, ctrls,
- num_ctrls++, &latest_entrycsn_bv );
-
- rs->sr_ctrls = ctrls;
- rs->sr_ref = rs->sr_v2ref;
- rs->sr_err = (rs->sr_v2ref == NULL) ? LDAP_SUCCESS : LDAP_REFERRAL;
- send_ldap_result( sop, rs );
-
- ch_free( latest_entrycsn_bv.bv_val );
- latest_entrycsn_bv.bv_val = NULL;
-
- if ( ctrls[num_ctrls-1]->ldctl_value.bv_val != NULL ) {
- ch_free( ctrls[num_ctrls-1]->ldctl_value.bv_val );
- }
- ch_free( ctrls[--num_ctrls] );
- ctrls[num_ctrls] = NULL;
- } else
-#endif
#ifdef LDAP_SYNC
if ( sop->o_sync_mode & SLAP_SYNC_REFRESH ) {
if ( sop->o_sync_mode & SLAP_SYNC_PERSIST ) {
}
#endif
-#ifdef LDAP_CLIENT_UPDATE
-int
-bdb_build_lcup_update_ctrl(
- Operation *op,
- SlapReply *rs,
- Entry *e,
- int entry_count,
- LDAPControl **ctrls,
- int num_ctrls,
- struct berval *latest_entrycsn_bv,
- int isdeleted )
-{
- Attribute* a;
- int ret;
- int res;
- const char *text = NULL;
-
- char berbuf[LBER_ELEMENT_SIZEOF];
- BerElement *ber = (BerElement *)berbuf;
-
- struct berval entrycsn_bv = { 0, NULL };
-
- ber_init2( ber, 0, LBER_USE_DER );
-
- ctrls[num_ctrls] = ch_malloc ( sizeof ( LDAPControl ) );
-
- for ( a = e->e_attrs; a != NULL; a = a->a_next ) {
- AttributeDescription *desc = a->a_desc;
- if ( desc == slap_schema.si_ad_entryCSN ) {
- ber_dupbv( &entrycsn_bv, &a->a_vals[0] );
- if ( latest_entrycsn_bv->bv_val == NULL ) {
- ber_dupbv( latest_entrycsn_bv, &entrycsn_bv );
- } else {
- res = value_match( &ret, desc,
- desc->ad_type->sat_ordering, 0,
- &entrycsn_bv, latest_entrycsn_bv, &text );
- if ( res != LDAP_SUCCESS ) {
- ret = 0;
-#ifdef NEW_LOGGING
- LDAP_LOG ( OPERATION, RESULTS,
- "bdb_search: value_match failed\n",
- 0, 0, 0 );
-#else
- Debug( LDAP_DEBUG_TRACE,
- "bdb_search: value_match failed\n",
- 0, 0, 0 );
-#endif
- }
-
- if ( ret > 0 ) {
- ch_free( latest_entrycsn_bv->bv_val );
- latest_entrycsn_bv->bv_val = NULL;
- ber_dupbv( latest_entrycsn_bv, &entrycsn_bv );
- }
- }
- }
- }
-
- if ( entry_count % op->o_clientupdate_interval == 0 ) {
- ber_printf( ber,
- "{bb{sON}N}",
- SLAP_LCUP_STATE_UPDATE_FALSE,
- isdeleted,
- LDAP_CUP_COOKIE_OID, &entrycsn_bv );
- } else { /* Do not send cookie */
- ber_printf( ber,
- "{bbN}",
- SLAP_LCUP_STATE_UPDATE_FALSE,
- isdeleted );
- }
-
- ch_free( entrycsn_bv.bv_val );
- entrycsn_bv.bv_val = NULL;
-
- ctrls[num_ctrls]->ldctl_oid = LDAP_CONTROL_ENTRY_UPDATE;
- ctrls[num_ctrls]->ldctl_iscritical = op->o_clientupdate;
- ret = ber_flatten2( ber, &ctrls[num_ctrls]->ldctl_value, 1 );
-
- ber_free_buf( ber );
-
- if ( ret < 0 ) {
-#ifdef NEW_LOGGING
- LDAP_LOG ( OPERATION, RESULTS,
- "bdb_build_lcup_ctrl: ber_flatten2 failed\n",
- 0, 0, 0 );
-#else
- Debug( LDAP_DEBUG_TRACE,
- "bdb_build_lcup_ctrl: ber_flatten2 failed\n",
- 0, 0, 0 );
-#endif
- send_ldap_error( op, rs, LDAP_OTHER, "internal error" );
- return ret;
- }
-
- return LDAP_SUCCESS;
-}
-
-int
-bdb_build_lcup_done_ctrl(
- Operation *op,
- SlapReply *rs,
- LDAPControl **ctrls,
- int num_ctrls,
- struct berval *latest_entrycsn_bv )
-{
- int ret;
- char berbuf[LBER_ELEMENT_SIZEOF];
- BerElement *ber = (BerElement *)berbuf;
-
- ber_init2( ber, NULL, LBER_USE_DER );
-
- ctrls[num_ctrls] = ch_malloc ( sizeof ( LDAPControl ) );
-
- ber_printf( ber, "{sON}", LDAP_CUP_COOKIE_OID, latest_entrycsn_bv );
-
- ctrls[num_ctrls]->ldctl_oid = LDAP_CONTROL_CLIENT_UPDATE_DONE;
- ctrls[num_ctrls]->ldctl_iscritical = op->o_clientupdate;
- ret = ber_flatten2( ber, &ctrls[num_ctrls]->ldctl_value, 1 );
-
- ber_free_buf( ber );
-
- if ( ret < 0 ) {
-#ifdef NEW_LOGGING
- LDAP_LOG ( OPERATION, RESULTS,
- "bdb_build_lcup_done_ctrl: ber_flatten2 failed\n", 0, 0, 0 );
-#else
- Debug( LDAP_DEBUG_TRACE,
- "bdb_build_lcup_done_ctrl: ber_flatten2 failed\n",
- 0, 0, 0 );
-#endif
- send_ldap_error( op, rs, LDAP_OTHER, "internal error" );
- return ret;
- }
-
- return LDAP_SUCCESS;
-}
-#endif
-
#ifdef LDAP_SYNC
int
bdb_build_sync_state_ctrl(
if ( ret < 0 ) {
#ifdef NEW_LOGGING
LDAP_LOG ( OPERATION, RESULTS,
- "bdb_build_lcup_done_ctrl: ber_flatten2 failed\n",
+ "bdb_build_sync_done_ctrl: ber_flatten2 failed\n",
0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
- "bdb_build_lcup_done_ctrl: ber_flatten2 failed\n",
+ "bdb_build_sync_done_ctrl: ber_flatten2 failed\n",
0, 0, 0 );
#endif
send_ldap_error( op, rs, LDAP_OTHER, "internal error" );
if ( ret < 0 ) {
#ifdef NEW_LOGGING
LDAP_LOG ( OPERATION, RESULTS,
- "bdb_build_lcup_done_ctrl: ber_flatten2 failed\n",
+ "bdb_send_ldap_intermediate: ber_flatten2 failed\n",
0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
- "bdb_build_lcup_done_ctrl: ber_flatten2 failed\n",
+ "bdb_send_ldap_intermediate: ber_flatten2 failed\n",
0, 0, 0 );
#endif
send_ldap_error( op, rs, LDAP_OTHER, "internal error" );
LDAP_STAILQ_REMOVE( &conn->c_ops, op, slap_op, o_next);
LDAP_STAILQ_NEXT(op, o_next) = NULL;
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
+#ifdef LDAP_SYNC
if ( op->o_cancel == SLAP_CANCEL_ACK )
goto co_op_free;
-#endif
-#ifdef LDAP_CLIENT_UPDATE
- if ( ( op->o_clientupdate_type & SLAP_LCUP_PERSIST ) ) {
- sl_mem_detach( ctx, memctx );
- goto no_co_op_free;
- }
-#endif
-#ifdef LDAP_SYNC
if ( ( op->o_sync_mode & SLAP_SYNC_PERSIST ) ) {
sl_mem_detach( ctx, memctx );
goto no_co_op_free;
#ifdef LDAP_CONTROL_SUBENTRIES
static SLAP_CTRL_PARSE_FN parseSubentries;
#endif
-#ifdef LDAP_CLIENT_UPDATE
-static SLAP_CTRL_PARSE_FN parseClientUpdate;
-#endif
#ifdef LDAP_SYNC
static SLAP_CTRL_PARSE_FN parseLdupSync;
#endif
{ LDAP_CONTROL_NOOP,
SLAP_CTRL_ACCESS, NULL,
parseNoOp, LDAP_SLIST_ENTRY_INITIALIZER(next) },
-#ifdef LDAP_CLIENT_UPDATE
- { LDAP_CONTROL_CLIENT_UPDATE,
- SLAP_CTRL_HIDE|SLAP_CTRL_SEARCH, NULL,
- parseClientUpdate, LDAP_SLIST_ENTRY_INITIALIZER(next) },
-#endif
#ifdef LDAP_SYNC
{ LDAP_CONTROL_SYNC,
SLAP_CTRL_HIDE|SLAP_CTRL_SEARCH, NULL,
}
#endif
-#ifdef LDAP_CLIENT_UPDATE
-static int parseClientUpdate (
- Operation *op,
- SlapReply *rs,
- LDAPControl *ctrl )
-{
- ber_tag_t tag;
- BerElement *ber;
- ber_int_t type;
- ber_int_t interval;
- ber_len_t len;
- struct berval scheme = { 0, NULL };
- struct berval cookie = { 0, NULL };
-
- if ( op->o_clientupdate != SLAP_NO_CONTROL ) {
- rs->sr_text = "LCUP client update control specified multiple times";
- return LDAP_PROTOCOL_ERROR;
- }
-
-#ifdef LDAP_SYNC
- if ( op->o_sync != SLAP_NO_CONTROL ) {
- rs->sr_text = "LDAP Client Update and Sync controls used together";
- return LDAP_PROTOCOL_ERROR;
- }
-#endif
-
- if ( ctrl->ldctl_value.bv_len == 0 ) {
- rs->sr_text = "LCUP client update control value is empty (or absent)";
- return LDAP_PROTOCOL_ERROR;
- }
-
- /* Parse the control value
- * ClientUpdateControlValue ::= SEQUENCE {
- * updateType ENUMERATED {
- * synchronizeOnly {0},
- * synchronizeAndPersist {1},
- * persistOnly {2} },
- * sendCookieInterval INTEGER OPTIONAL,
- * cookie LCUPCookie OPTIONAL
- * }
- */
-
- ber = ber_init( &ctrl->ldctl_value );
- if( ber == NULL ) {
- rs->sr_text = "internal error";
- return LDAP_OTHER;
- }
-
- if ( (tag = ber_scanf( ber, "{i" /*}*/, &type )) == LBER_ERROR ) {
- rs->sr_text = "LCUP client update control : decoding error";
- return LDAP_PROTOCOL_ERROR;
- }
-
- switch( type ) {
- case LDAP_CUP_SYNC_ONLY:
- type = SLAP_LCUP_SYNC;
- break;
- case LDAP_CUP_SYNC_AND_PERSIST:
- type = SLAP_LCUP_SYNC_AND_PERSIST;
- break;
- case LDAP_CUP_PERSIST_ONLY:
- type = SLAP_LCUP_PERSIST;
- break;
- default:
- rs->sr_text = "LCUP client update control : unknown update type";
- return LDAP_PROTOCOL_ERROR;
- }
-
- if ( (tag = ber_peek_tag( ber, &len )) == LBER_DEFAULT ) {
- rs->sr_text = "LCUP client update control : decoding error";
- return LDAP_PROTOCOL_ERROR;
- }
-
- if ( tag == LDAP_CUP_TAG_INTERVAL ) {
- if ( (tag = ber_scanf( ber, "i", &interval )) == LBER_ERROR ) {
- rs->sr_text = "LCUP client update control : decoding error";
- return LDAP_PROTOCOL_ERROR;
- }
-
- if ( interval <= 0 ) {
- /* server chooses interval */
- interval = LDAP_CUP_DEFAULT_SEND_COOKIE_INTERVAL;
- }
-
- } else {
- /* server chooses interval */
- interval = LDAP_CUP_DEFAULT_SEND_COOKIE_INTERVAL;
- }
-
- if ( (tag = ber_peek_tag( ber, &len )) == LBER_DEFAULT ) {
- rs->sr_text = "LCUP client update control : decoding error";
- return LDAP_PROTOCOL_ERROR;
- }
-
- if ( tag == LDAP_CUP_TAG_COOKIE ) {
- if ( (tag = ber_scanf( ber, /*{*/ "{mm}}",
- &scheme, &cookie )) == LBER_ERROR )
- {
- rs->sr_text = "LCUP client update control : decoding error";
- return LDAP_PROTOCOL_ERROR;
- }
- }
-
- /* TODO : Cookie Scheme Validation */
-#if 0
- if ( lcup_cookie_scheme_validate(scheme) != LDAP_SUCCESS ) {
- rs->sr_text = "Unsupported LCUP cookie scheme";
- return LCUP_UNSUPPORTED_SCHEME;
- }
-
- if ( lcup_cookie_validate(scheme, cookie) != LDAP_SUCCESS ) {
- rs->sr_text = "Invalid LCUP cookie";
- return LCUP_INVALID_COOKIE;
- }
-#endif
-
- ber_dupbv( &op->o_clientupdate_state, &cookie );
-
- (void) ber_free( ber, 1 );
-
- op->o_clientupdate_type = (char) type;
- op->o_clientupdate_interval = interval;
-
- op->o_clientupdate = ctrl->ldctl_iscritical
- ? SLAP_CRITICAL_CONTROL
- : SLAP_NONCRITICAL_CONTROL;
-
- return LDAP_SUCCESS;
-}
-#endif
-
#ifdef LDAP_SYNC
static int parseLdupSync (
Operation *op,
return LDAP_PROTOCOL_ERROR;
}
-#ifdef LDAP_CLIENT_UPDATE
- if ( op->o_clientupdate != SLAP_NO_CONTROL ) {
- rs->sr_text = "LDAP Sync and LDAP Client Update controls used together";
- return LDAP_PROTOCOL_ERROR;
- }
-#endif
-
if ( ctrl->ldctl_value.bv_len == 0 ) {
rs->sr_text = "LDAP Sync control value is empty (or absent)";
return LDAP_PROTOCOL_ERROR;
cookie.bv_val = NULL;
}
- /* TODO : Cookie Scheme Validation */
-#if 0
- if ( lcup_cookie_scheme_validate(scheme) != LDAP_SUCCESS ) {
- rs->sr_text = "Unsupported LCUP cookie scheme";
- return LCUP_UNSUPPORTED_SCHEME;
- }
-
- if ( lcup_cookie_validate(scheme, cookie) != LDAP_SUCCESS ) {
- rs->sr_text = "Invalid LCUP cookie";
- return LCUP_INVALID_COOKIE;
- }
-#endif
-
ber_dupbv( &op->o_sync_state, &cookie );
(void) ber_free( ber, 1 );
ber_free( op->o_res_ber, 1 );
}
#endif
-#ifdef LDAP_CLIENT_UPDATE
- if ( op->o_clientupdate_state.bv_val != NULL ) {
- free( op->o_clientupdate_state.bv_val );
- }
-#endif
#ifdef LDAP_SYNC
if ( op->o_sync_state.bv_val != NULL ) {
free( op->o_sync_state.bv_val );
* if we don't hold it.
*/
- /* Sync / LCUP controls override manageDSAit */
+ /* Sync control overrides manageDSAit */
if ( manageDSAit != SLAP_NO_CONTROL ) {
-#ifdef LDAP_CLIENT_UPDATE
- if ( op->o_clientupdate_type & SLAP_LCUP_SYNC ) {
- be_manageDSAit = SLAP_NO_CONTROL;
- } else
-#endif
#ifdef LDAP_SYNC
if ( op->o_sync_mode & SLAP_SYNC_REFRESH ) {
be_manageDSAit = SLAP_NO_CONTROL;
return_results:;
-#ifdef LDAP_CLIENT_UPDATE
- if ( ( op->o_clientupdate_type & SLAP_LCUP_PERSIST ) )
- return rs->sr_err;
-#endif
-#if defined(LDAP_CLIENT_UPDATE) && defined(LDAP_SYNC)
- else
-#endif
#ifdef LDAP_SYNC
if ( ( op->o_sync_mode & SLAP_SYNC_PERSIST ) )
return rs->sr_err;
#define SLAP_SYNTAX_MATCHINGRULEUSES_OID "1.3.6.1.4.1.1466.115.121.1.31"
#define SLAP_SYNTAX_CONTENTRULE_OID "1.3.6.1.4.1.1466.115.121.1.16"
-#ifdef LDAP_CLIENT_UPDATE
-#define LCUP_COOKIE_OID "1.3.6.1.4.1.4203.666.10.1"
-#endif /* LDAP_CLIENT_UPDATE */
-
/*
* represents schema information for a database
*/
} PagedResultsState;
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
+#ifdef LDAP_SYNC
#define LDAP_PSEARCH_BY_ADD 0x01
#define LDAP_PSEARCH_BY_DELETE 0x02
#define LDAP_PSEARCH_BY_PREMODIFY 0x03
#define get_pagedresults(op) (0)
#endif
-#ifdef LDAP_CLIENT_UPDATE
- char o_clientupdate;
- char o_clientupdate_type;
-#define SLAP_LCUP_NONE (0x0)
-#define SLAP_LCUP_SYNC (0x1)
-#define SLAP_LCUP_PERSIST (0x2)
-#define SLAP_LCUP_SYNC_AND_PERSIST (0x3)
- ber_int_t o_clientupdate_interval;
- struct berval o_clientupdate_state;
-#endif
-
#ifdef LDAP_SYNC
char o_sync;
char o_sync_mode;
#define SLAP_SYNC_PERSIST (0x2)
#define SLAP_SYNC_REFRESH_AND_PERSIST (0x3)
struct berval o_sync_state;
-#endif
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
int o_ps_protocol;
int o_ps_entries;
LDAP_LIST_ENTRY(slap_op) o_ps_link;
#define SLAP_LDAPDN_PRETTY 0x1
#define SLAP_LDAPDN_MAXLEN 8192
-/*
- * Macros for LCUP
- */
-#ifdef LDAP_CLIENT_UPDATE
-#define SLAP_LCUP_STATE_UPDATE_TRUE 1
-#define SLAP_LCUP_STATE_UPDATE_FALSE 0
-#define SLAP_LCUP_ENTRY_DELETED_TRUE 1
-#define SLAP_LCUP_ENTRY_DELETED_FALSE 0
-#endif /* LDAP_CLIENT_UPDATE */
-
-#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
+#ifdef LDAP_SYNC
#define SLAP_SEARCH_MAX_CTRLS 10
#endif