mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-20 22:59:34 -05:00
Disable back-bdb native syncrepl support, enable syncprov overlay,
remove syncrepl stuff from Operation struct
This commit is contained in:
parent
618cc56265
commit
3a5bde98ba
32 changed files with 1248 additions and 1025 deletions
16
configure.in
16
configure.in
|
|
@ -243,7 +243,7 @@ OL_ARG_ENABLE(sql,[ --enable-sql enable sql backend no|yes|mod],
|
||||||
dnl ----------------------------------------------------------------
|
dnl ----------------------------------------------------------------
|
||||||
dnl SLAPD Overlay Options
|
dnl SLAPD Overlay Options
|
||||||
Overlays="chain denyop dyngroup lastmod ppolicy proxycache rwm \
|
Overlays="chain denyop dyngroup lastmod ppolicy proxycache rwm \
|
||||||
refint unique"
|
refint syncprov unique"
|
||||||
|
|
||||||
AC_ARG_WITH(xxslapoverlays,[
|
AC_ARG_WITH(xxslapoverlays,[
|
||||||
SLAPD Overlay Options:])
|
SLAPD Overlay Options:])
|
||||||
|
|
@ -266,6 +266,8 @@ OL_ARG_ENABLE(refint,[ --enable-refint Referential Integrity overlay no|yes
|
||||||
no, [no yes mod])
|
no, [no yes mod])
|
||||||
OL_ARG_ENABLE(rwm,[ --enable-rwm Rewrite/Remap overlay no|yes|mod],
|
OL_ARG_ENABLE(rwm,[ --enable-rwm Rewrite/Remap overlay no|yes|mod],
|
||||||
no, [no yes mod])
|
no, [no yes mod])
|
||||||
|
OL_ARG_ENABLE(syncprov,[ --enable-syncprov Syncrepl Provider overlay no|yes|mod],
|
||||||
|
yes, [no yes mod])
|
||||||
OL_ARG_ENABLE(unique,[ --enable-unique Attribute Uniqueness overlay no|yes|mod],
|
OL_ARG_ENABLE(unique,[ --enable-unique Attribute Uniqueness overlay no|yes|mod],
|
||||||
no, [no yes mod])
|
no, [no yes mod])
|
||||||
|
|
||||||
|
|
@ -2853,6 +2855,17 @@ if test "$ol_enable_rwm" != no ; then
|
||||||
AC_DEFINE_UNQUOTED(SLAPD_OVER_RWM,$MFLAG,[define for Rewrite/Remap overlay])
|
AC_DEFINE_UNQUOTED(SLAPD_OVER_RWM,$MFLAG,[define for Rewrite/Remap overlay])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test "$ol_enable_syncprov" != no ; then
|
||||||
|
BUILD_SYNCPROV=$ol_enable_syncprov
|
||||||
|
if test "$ol_enable_syncprov" = mod ; then
|
||||||
|
MFLAG=SLAPD_MOD_DYNAMIC
|
||||||
|
SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS syncprov.la"
|
||||||
|
else
|
||||||
|
MFLAG=SLAPD_MOD_STATIC
|
||||||
|
fi
|
||||||
|
AC_DEFINE_UNQUOTED(SLAPD_OVER_SYNCPROV,$MFLAG,[define for Syncrepl Provider overlay])
|
||||||
|
fi
|
||||||
|
|
||||||
if test "$ol_enable_unique" != no ; then
|
if test "$ol_enable_unique" != no ; then
|
||||||
BUILD_UNIQUE=$ol_enable_unique
|
BUILD_UNIQUE=$ol_enable_unique
|
||||||
if test "$ol_enable_unique" = mod ; then
|
if test "$ol_enable_unique" = mod ; then
|
||||||
|
|
@ -2984,6 +2997,7 @@ dnl overlays
|
||||||
AC_SUBST(BUILD_PROXYCACHE)
|
AC_SUBST(BUILD_PROXYCACHE)
|
||||||
AC_SUBST(BUILD_REFINT)
|
AC_SUBST(BUILD_REFINT)
|
||||||
AC_SUBST(BUILD_RWM)
|
AC_SUBST(BUILD_RWM)
|
||||||
|
AC_SUBST(BUILD_SYNCPROV)
|
||||||
AC_SUBST(BUILD_UNIQUE)
|
AC_SUBST(BUILD_UNIQUE)
|
||||||
AC_SUBST(BUILD_SLURPD)
|
AC_SUBST(BUILD_SLURPD)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -701,7 +701,7 @@
|
||||||
/* define if you have winsock2 */
|
/* define if you have winsock2 */
|
||||||
#undef HAVE_WINSOCK2
|
#undef HAVE_WINSOCK2
|
||||||
|
|
||||||
/* define if you have epoll */
|
/* define if your system supports epoll */
|
||||||
#undef HAVE_EPOLL
|
#undef HAVE_EPOLL
|
||||||
|
|
||||||
/* define if sys_errlist is not declared in stdio.h or errno.h */
|
/* define if sys_errlist is not declared in stdio.h or errno.h */
|
||||||
|
|
@ -1058,6 +1058,9 @@
|
||||||
/* define for Rewrite/Remap overlay */
|
/* define for Rewrite/Remap overlay */
|
||||||
#undef SLAPD_OVER_RWM
|
#undef SLAPD_OVER_RWM
|
||||||
|
|
||||||
|
/* define for Syncrepl Provider overlay */
|
||||||
|
#undef SLAPD_OVER_SYNCPROV
|
||||||
|
|
||||||
/* define for Attribute Uniqueness overlay */
|
/* define for Attribute Uniqueness overlay */
|
||||||
#undef SLAPD_OVER_UNIQUE
|
#undef SLAPD_OVER_UNIQUE
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2045,7 +2045,6 @@ aci_set_gather( SetCookie *cookie, struct berval *name, AttributeDescription *de
|
||||||
op2.ors_tlimit = SLAP_NO_LIMIT;
|
op2.ors_tlimit = SLAP_NO_LIMIT;
|
||||||
op2.ors_attrs = anlistp;
|
op2.ors_attrs = anlistp;
|
||||||
op2.ors_attrsonly = 0;
|
op2.ors_attrsonly = 0;
|
||||||
op2.o_sync_slog_size = -1;
|
|
||||||
|
|
||||||
cb.sc_private = &p;
|
cb.sc_private = &p;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -419,6 +419,7 @@ retry: /* transaction retry */
|
||||||
suffix_ei = BEI(e);
|
suffix_ei = BEI(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef BDB_PSEARCH
|
||||||
if ( LDAP_STAILQ_EMPTY( &op->o_bd->be_syncinfo )) {
|
if ( LDAP_STAILQ_EMPTY( &op->o_bd->be_syncinfo )) {
|
||||||
if ( ctxcsn_added ) {
|
if ( ctxcsn_added ) {
|
||||||
bdb_cache_add( bdb, suffix_ei, ctxcsn_e,
|
bdb_cache_add( bdb, suffix_ei, ctxcsn_e,
|
||||||
|
|
@ -441,6 +442,7 @@ retry: /* transaction retry */
|
||||||
}
|
}
|
||||||
ldap_pvt_thread_rdwr_wunlock( &bdb->bi_pslist_rwlock );
|
ldap_pvt_thread_rdwr_wunlock( &bdb->bi_pslist_rwlock );
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if(( rs->sr_err=TXN_COMMIT( ltid, 0 )) != 0 ) {
|
if(( rs->sr_err=TXN_COMMIT( ltid, 0 )) != 0 ) {
|
||||||
rs->sr_text = "txn_commit failed";
|
rs->sr_text = "txn_commit failed";
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,8 @@
|
||||||
|
|
||||||
LDAP_BEGIN_DECL
|
LDAP_BEGIN_DECL
|
||||||
|
|
||||||
|
#undef BDB_PSEARCH
|
||||||
|
|
||||||
#define DB_VERSION_FULL ((DB_VERSION_MAJOR << 24) | (DB_VERSION_MINOR << 16) | DB_VERSION_PATCH)
|
#define DB_VERSION_FULL ((DB_VERSION_MAJOR << 24) | (DB_VERSION_MINOR << 16) | DB_VERSION_PATCH)
|
||||||
|
|
||||||
#define BDB_SUBENTRIES 1
|
#define BDB_SUBENTRIES 1
|
||||||
|
|
@ -175,9 +177,11 @@ struct bdb_info {
|
||||||
|
|
||||||
ID bi_lastid;
|
ID bi_lastid;
|
||||||
ldap_pvt_thread_mutex_t bi_lastid_mutex;
|
ldap_pvt_thread_mutex_t bi_lastid_mutex;
|
||||||
|
#ifdef BDB_PSEARCH
|
||||||
LDAP_LIST_HEAD(pl, slap_op) bi_psearch_list;
|
LDAP_LIST_HEAD(pl, slap_op) bi_psearch_list;
|
||||||
ldap_pvt_thread_rdwr_t bi_pslist_rwlock;
|
ldap_pvt_thread_rdwr_t bi_pslist_rwlock;
|
||||||
LDAP_LIST_HEAD(se, slap_session_entry) bi_session_list;
|
LDAP_LIST_HEAD(se, slap_session_entry) bi_session_list;
|
||||||
|
#endif
|
||||||
int bi_idl_cache_max_size;
|
int bi_idl_cache_max_size;
|
||||||
int bi_idl_cache_size;
|
int bi_idl_cache_size;
|
||||||
Avlnode *bi_idl_tree;
|
Avlnode *bi_idl_tree;
|
||||||
|
|
|
||||||
|
|
@ -194,6 +194,7 @@ bdb_db_config(
|
||||||
}
|
}
|
||||||
if ( !( slapMode & SLAP_TOOL_MODE ) )
|
if ( !( slapMode & SLAP_TOOL_MODE ) )
|
||||||
bdb->bi_idl_cache_max_size = atoi( argv[1] );
|
bdb->bi_idl_cache_max_size = atoi( argv[1] );
|
||||||
|
#ifdef BDB_PSEARCH
|
||||||
} else if ( strcasecmp( argv[0], "sessionlog" ) == 0 ) {
|
} else if ( strcasecmp( argv[0], "sessionlog" ) == 0 ) {
|
||||||
int se_id = 0, se_size = 0;
|
int se_id = 0, se_size = 0;
|
||||||
struct slap_session_entry *sent;
|
struct slap_session_entry *sent;
|
||||||
|
|
@ -234,7 +235,7 @@ bdb_db_config(
|
||||||
sent->se_id = se_id;
|
sent->se_id = se_id;
|
||||||
sent->se_size = se_size;
|
sent->se_size = se_size;
|
||||||
LDAP_LIST_INSERT_HEAD( &bdb->bi_session_list, sent, se_link );
|
LDAP_LIST_INSERT_HEAD( &bdb->bi_session_list, sent, se_link );
|
||||||
|
#endif /* BDB_PSEARCH */
|
||||||
/* anything else */
|
/* anything else */
|
||||||
} else {
|
} else {
|
||||||
return SLAP_CONF_UNKNOWN;
|
return SLAP_CONF_UNKNOWN;
|
||||||
|
|
|
||||||
|
|
@ -377,6 +377,7 @@ retry: /* transaction retry */
|
||||||
goto return_results;
|
goto return_results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef BDB_PSEARCH
|
||||||
ldap_pvt_thread_rdwr_wlock( &bdb->bi_pslist_rwlock );
|
ldap_pvt_thread_rdwr_wlock( &bdb->bi_pslist_rwlock );
|
||||||
LDAP_LIST_FOREACH( ps_list, &bdb->bi_psearch_list, o_ps_link ) {
|
LDAP_LIST_FOREACH( ps_list, &bdb->bi_psearch_list, o_ps_link ) {
|
||||||
rc = bdb_psearch( op, rs, ps_list, e, LDAP_PSEARCH_BY_PREDELETE );
|
rc = bdb_psearch( op, rs, ps_list, e, LDAP_PSEARCH_BY_PREDELETE );
|
||||||
|
|
@ -390,6 +391,7 @@ retry: /* transaction retry */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ldap_pvt_thread_rdwr_wunlock( &bdb->bi_pslist_rwlock );
|
ldap_pvt_thread_rdwr_wunlock( &bdb->bi_pslist_rwlock );
|
||||||
|
#endif
|
||||||
|
|
||||||
/* delete from dn2id */
|
/* delete from dn2id */
|
||||||
rs->sr_err = bdb_dn2id_delete( op, lt2, eip, e );
|
rs->sr_err = bdb_dn2id_delete( op, lt2, eip, e );
|
||||||
|
|
@ -509,6 +511,7 @@ retry: /* transaction retry */
|
||||||
goto retry;
|
goto retry;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef BDB_PSEARCH
|
||||||
if ( LDAP_STAILQ_EMPTY( &op->o_bd->be_syncinfo )) {
|
if ( LDAP_STAILQ_EMPTY( &op->o_bd->be_syncinfo )) {
|
||||||
if ( ctxcsn_added ) {
|
if ( ctxcsn_added ) {
|
||||||
bdb_cache_add( bdb, suffix_ei,
|
bdb_cache_add( bdb, suffix_ei,
|
||||||
|
|
@ -543,6 +546,7 @@ retry: /* transaction retry */
|
||||||
}
|
}
|
||||||
ldap_pvt_thread_rdwr_wunlock( &bdb->bi_pslist_rwlock );
|
ldap_pvt_thread_rdwr_wunlock( &bdb->bi_pslist_rwlock );
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
rs->sr_err = TXN_COMMIT( ltid, 0 );
|
rs->sr_err = TXN_COMMIT( ltid, 0 );
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -84,11 +84,13 @@ bdb_db_init( BackendDB *be )
|
||||||
bdb->bi_search_stack_depth = DEFAULT_SEARCH_STACK_DEPTH;
|
bdb->bi_search_stack_depth = DEFAULT_SEARCH_STACK_DEPTH;
|
||||||
bdb->bi_search_stack = NULL;
|
bdb->bi_search_stack = NULL;
|
||||||
|
|
||||||
|
#ifdef BDB_PSEARCH
|
||||||
LDAP_LIST_INIT (&bdb->bi_psearch_list);
|
LDAP_LIST_INIT (&bdb->bi_psearch_list);
|
||||||
|
ldap_pvt_thread_rdwr_init ( &bdb->bi_pslist_rwlock );
|
||||||
|
#endif
|
||||||
|
|
||||||
ldap_pvt_thread_mutex_init( &bdb->bi_database_mutex );
|
ldap_pvt_thread_mutex_init( &bdb->bi_database_mutex );
|
||||||
ldap_pvt_thread_mutex_init( &bdb->bi_lastid_mutex );
|
ldap_pvt_thread_mutex_init( &bdb->bi_lastid_mutex );
|
||||||
ldap_pvt_thread_rdwr_init ( &bdb->bi_pslist_rwlock );
|
|
||||||
ldap_pvt_thread_mutex_init( &bdb->bi_cache.lru_mutex );
|
ldap_pvt_thread_mutex_init( &bdb->bi_cache.lru_mutex );
|
||||||
ldap_pvt_thread_mutex_init( &bdb->bi_cache.c_dntree.bei_kids_mutex );
|
ldap_pvt_thread_mutex_init( &bdb->bi_cache.c_dntree.bei_kids_mutex );
|
||||||
ldap_pvt_thread_rdwr_init ( &bdb->bi_cache.c_rwlock );
|
ldap_pvt_thread_rdwr_init ( &bdb->bi_cache.c_rwlock );
|
||||||
|
|
@ -455,7 +457,6 @@ bdb_db_destroy( BackendDB *be )
|
||||||
ldap_pvt_thread_rdwr_destroy ( &bdb->bi_cache.c_rwlock );
|
ldap_pvt_thread_rdwr_destroy ( &bdb->bi_cache.c_rwlock );
|
||||||
ldap_pvt_thread_mutex_destroy( &bdb->bi_cache.lru_mutex );
|
ldap_pvt_thread_mutex_destroy( &bdb->bi_cache.lru_mutex );
|
||||||
ldap_pvt_thread_mutex_destroy( &bdb->bi_cache.c_dntree.bei_kids_mutex );
|
ldap_pvt_thread_mutex_destroy( &bdb->bi_cache.c_dntree.bei_kids_mutex );
|
||||||
ldap_pvt_thread_rdwr_destroy ( &bdb->bi_pslist_rwlock );
|
|
||||||
ldap_pvt_thread_mutex_destroy( &bdb->bi_lastid_mutex );
|
ldap_pvt_thread_mutex_destroy( &bdb->bi_lastid_mutex );
|
||||||
ldap_pvt_thread_mutex_destroy( &bdb->bi_database_mutex );
|
ldap_pvt_thread_mutex_destroy( &bdb->bi_database_mutex );
|
||||||
if ( bdb->bi_idl_cache_max_size ) {
|
if ( bdb->bi_idl_cache_max_size ) {
|
||||||
|
|
@ -463,6 +464,8 @@ bdb_db_destroy( BackendDB *be )
|
||||||
ldap_pvt_thread_mutex_destroy( &bdb->bi_idl_tree_lrulock );
|
ldap_pvt_thread_mutex_destroy( &bdb->bi_idl_tree_lrulock );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef BDB_PSEARCH
|
||||||
|
ldap_pvt_thread_rdwr_destroy ( &bdb->bi_pslist_rwlock );
|
||||||
ps = LDAP_LIST_FIRST( &bdb->bi_psearch_list );
|
ps = LDAP_LIST_FIRST( &bdb->bi_psearch_list );
|
||||||
|
|
||||||
if ( ps ) {
|
if ( ps ) {
|
||||||
|
|
@ -521,6 +524,7 @@ bdb_db_destroy( BackendDB *be )
|
||||||
slap_sl_mem_destroy( NULL, saved_tmpmemctx );
|
slap_sl_mem_destroy( NULL, saved_tmpmemctx );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
ch_free( bdb );
|
ch_free( bdb );
|
||||||
be->be_private = NULL;
|
be->be_private = NULL;
|
||||||
|
|
@ -626,8 +630,10 @@ bdb_back_initialize(
|
||||||
|
|
||||||
bi->bi_op_unbind = 0;
|
bi->bi_op_unbind = 0;
|
||||||
|
|
||||||
|
#if 0
|
||||||
bi->bi_op_abandon = bdb_abandon;
|
bi->bi_op_abandon = bdb_abandon;
|
||||||
bi->bi_op_cancel = bdb_cancel;
|
bi->bi_op_cancel = bdb_cancel;
|
||||||
|
#endif
|
||||||
|
|
||||||
bi->bi_extended = bdb_extended;
|
bi->bi_extended = bdb_extended;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -307,6 +307,7 @@ retry: /* transaction retry */
|
||||||
Debug(LDAP_DEBUG_TRACE,
|
Debug(LDAP_DEBUG_TRACE,
|
||||||
LDAP_XSTRING(bdb_modify) ": retrying...\n", 0, 0, 0);
|
LDAP_XSTRING(bdb_modify) ": retrying...\n", 0, 0, 0);
|
||||||
|
|
||||||
|
#ifdef BDB_PSEARCH
|
||||||
pm_list = LDAP_LIST_FIRST(&op->o_pm_list);
|
pm_list = LDAP_LIST_FIRST(&op->o_pm_list);
|
||||||
while ( pm_list != NULL ) {
|
while ( pm_list != NULL ) {
|
||||||
LDAP_LIST_REMOVE ( pm_list, ps_link );
|
LDAP_LIST_REMOVE ( pm_list, ps_link );
|
||||||
|
|
@ -314,6 +315,7 @@ retry: /* transaction retry */
|
||||||
pm_list = LDAP_LIST_NEXT ( pm_list, ps_link );
|
pm_list = LDAP_LIST_NEXT ( pm_list, ps_link );
|
||||||
ch_free( pm_prev );
|
ch_free( pm_prev );
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
rs->sr_err = TXN_ABORT( ltid );
|
rs->sr_err = TXN_ABORT( ltid );
|
||||||
ltid = NULL;
|
ltid = NULL;
|
||||||
|
|
@ -445,6 +447,7 @@ retry: /* transaction retry */
|
||||||
goto return_results;
|
goto return_results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef BDB_PSEARCH
|
||||||
if ( rs->sr_err == LDAP_SUCCESS && !op->o_noop && !op->o_no_psearch ) {
|
if ( rs->sr_err == LDAP_SUCCESS && !op->o_noop && !op->o_no_psearch ) {
|
||||||
ldap_pvt_thread_rdwr_wlock( &bdb->bi_pslist_rwlock );
|
ldap_pvt_thread_rdwr_wlock( &bdb->bi_pslist_rwlock );
|
||||||
LDAP_LIST_FOREACH ( ps_list, &bdb->bi_psearch_list, o_ps_link ) {
|
LDAP_LIST_FOREACH ( ps_list, &bdb->bi_psearch_list, o_ps_link ) {
|
||||||
|
|
@ -461,6 +464,7 @@ retry: /* transaction retry */
|
||||||
}
|
}
|
||||||
ldap_pvt_thread_rdwr_wunlock( &bdb->bi_pslist_rwlock );
|
ldap_pvt_thread_rdwr_wunlock( &bdb->bi_pslist_rwlock );
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if( op->o_preread ) {
|
if( op->o_preread ) {
|
||||||
if( preread_ctrl == NULL ) {
|
if( preread_ctrl == NULL ) {
|
||||||
|
|
@ -575,6 +579,7 @@ retry: /* transaction retry */
|
||||||
}
|
}
|
||||||
dummy.e_attrs = NULL;
|
dummy.e_attrs = NULL;
|
||||||
|
|
||||||
|
#ifdef BDB_PSEARCH
|
||||||
if ( LDAP_STAILQ_EMPTY( &op->o_bd->be_syncinfo )) {
|
if ( LDAP_STAILQ_EMPTY( &op->o_bd->be_syncinfo )) {
|
||||||
if ( ctxcsn_added ) {
|
if ( ctxcsn_added ) {
|
||||||
bdb_cache_add( bdb, suffix_ei, ctxcsn_e,
|
bdb_cache_add( bdb, suffix_ei, ctxcsn_e,
|
||||||
|
|
@ -613,6 +618,7 @@ retry: /* transaction retry */
|
||||||
}
|
}
|
||||||
ldap_pvt_thread_rdwr_wunlock( &bdb->bi_pslist_rwlock );
|
ldap_pvt_thread_rdwr_wunlock( &bdb->bi_pslist_rwlock );
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
rs->sr_err = TXN_COMMIT( ltid, 0 );
|
rs->sr_err = TXN_COMMIT( ltid, 0 );
|
||||||
}
|
}
|
||||||
|
|
@ -653,6 +659,7 @@ return_results:
|
||||||
|
|
||||||
done:
|
done:
|
||||||
if( ltid != NULL ) {
|
if( ltid != NULL ) {
|
||||||
|
#ifdef BDB_PSEARCH
|
||||||
pm_list = LDAP_LIST_FIRST(&op->o_pm_list);
|
pm_list = LDAP_LIST_FIRST(&op->o_pm_list);
|
||||||
while ( pm_list != NULL ) {
|
while ( pm_list != NULL ) {
|
||||||
LDAP_LIST_REMOVE ( pm_list, ps_link );
|
LDAP_LIST_REMOVE ( pm_list, ps_link );
|
||||||
|
|
@ -660,6 +667,7 @@ done:
|
||||||
pm_list = LDAP_LIST_NEXT ( pm_list, ps_link );
|
pm_list = LDAP_LIST_NEXT ( pm_list, ps_link );
|
||||||
ch_free( pm_prev );
|
ch_free( pm_prev );
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
TXN_ABORT( ltid );
|
TXN_ABORT( ltid );
|
||||||
op->o_private = NULL;
|
op->o_private = NULL;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -100,6 +100,7 @@ retry: /* transaction retry */
|
||||||
}
|
}
|
||||||
Debug( LDAP_DEBUG_TRACE, "==>" LDAP_XSTRING(bdb_modrdn)
|
Debug( LDAP_DEBUG_TRACE, "==>" LDAP_XSTRING(bdb_modrdn)
|
||||||
": retrying...\n", 0, 0, 0 );
|
": retrying...\n", 0, 0, 0 );
|
||||||
|
#ifdef BDB_PSEARCH
|
||||||
pm_list = LDAP_LIST_FIRST(&op->o_pm_list);
|
pm_list = LDAP_LIST_FIRST(&op->o_pm_list);
|
||||||
while ( pm_list != NULL ) {
|
while ( pm_list != NULL ) {
|
||||||
LDAP_LIST_REMOVE ( pm_list, ps_link );
|
LDAP_LIST_REMOVE ( pm_list, ps_link );
|
||||||
|
|
@ -107,6 +108,7 @@ retry: /* transaction retry */
|
||||||
pm_list = LDAP_LIST_NEXT ( pm_list, ps_link );
|
pm_list = LDAP_LIST_NEXT ( pm_list, ps_link );
|
||||||
ch_free( pm_prev );
|
ch_free( pm_prev );
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
rs->sr_err = TXN_ABORT( ltid );
|
rs->sr_err = TXN_ABORT( ltid );
|
||||||
ltid = NULL;
|
ltid = NULL;
|
||||||
|
|
@ -718,6 +720,7 @@ retry: /* transaction retry */
|
||||||
|
|
||||||
dummy.e_attrs = e->e_attrs;
|
dummy.e_attrs = e->e_attrs;
|
||||||
|
|
||||||
|
#ifdef BDB_PSEARCH
|
||||||
if ( rs->sr_err == LDAP_SUCCESS && !op->o_noop && !op->o_no_psearch ) {
|
if ( rs->sr_err == LDAP_SUCCESS && !op->o_noop && !op->o_no_psearch ) {
|
||||||
ldap_pvt_thread_rdwr_wlock( &bdb->bi_pslist_rwlock );
|
ldap_pvt_thread_rdwr_wlock( &bdb->bi_pslist_rwlock );
|
||||||
LDAP_LIST_FOREACH ( ps_list, &bdb->bi_psearch_list, o_ps_link ) {
|
LDAP_LIST_FOREACH ( ps_list, &bdb->bi_psearch_list, o_ps_link ) {
|
||||||
|
|
@ -731,6 +734,7 @@ retry: /* transaction retry */
|
||||||
}
|
}
|
||||||
ldap_pvt_thread_rdwr_wunlock( &bdb->bi_pslist_rwlock );
|
ldap_pvt_thread_rdwr_wunlock( &bdb->bi_pslist_rwlock );
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* modify entry */
|
/* modify entry */
|
||||||
|
|
@ -847,6 +851,7 @@ retry: /* transaction retry */
|
||||||
new_dn.bv_val = NULL;
|
new_dn.bv_val = NULL;
|
||||||
new_ndn.bv_val = NULL;
|
new_ndn.bv_val = NULL;
|
||||||
|
|
||||||
|
#ifdef BDB_PSEARCH
|
||||||
if ( LDAP_STAILQ_EMPTY( &op->o_bd->be_syncinfo )) {
|
if ( LDAP_STAILQ_EMPTY( &op->o_bd->be_syncinfo )) {
|
||||||
if ( ctxcsn_added ) {
|
if ( ctxcsn_added ) {
|
||||||
bdb_cache_add( bdb, suffix_ei, ctxcsn_e,
|
bdb_cache_add( bdb, suffix_ei, ctxcsn_e,
|
||||||
|
|
@ -885,6 +890,7 @@ retry: /* transaction retry */
|
||||||
}
|
}
|
||||||
ldap_pvt_thread_rdwr_wunlock( &bdb->bi_pslist_rwlock );
|
ldap_pvt_thread_rdwr_wunlock( &bdb->bi_pslist_rwlock );
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if(( rs->sr_err=TXN_COMMIT( ltid, 0 )) != 0 ) {
|
if(( rs->sr_err=TXN_COMMIT( ltid, 0 )) != 0 ) {
|
||||||
rs->sr_text = "txn_commit failed";
|
rs->sr_text = "txn_commit failed";
|
||||||
|
|
@ -972,6 +978,7 @@ done:
|
||||||
}
|
}
|
||||||
|
|
||||||
if( ltid != NULL ) {
|
if( ltid != NULL ) {
|
||||||
|
#ifdef BDB_PSEARCH
|
||||||
pm_list = LDAP_LIST_FIRST(&op->o_pm_list);
|
pm_list = LDAP_LIST_FIRST(&op->o_pm_list);
|
||||||
while ( pm_list != NULL ) {
|
while ( pm_list != NULL ) {
|
||||||
LDAP_LIST_REMOVE ( pm_list, ps_link );
|
LDAP_LIST_REMOVE ( pm_list, ps_link );
|
||||||
|
|
@ -979,6 +986,7 @@ done:
|
||||||
pm_list = LDAP_LIST_NEXT ( pm_list, ps_link );
|
pm_list = LDAP_LIST_NEXT ( pm_list, ps_link );
|
||||||
ch_free( pm_prev );
|
ch_free( pm_prev );
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
TXN_ABORT( ltid );
|
TXN_ABORT( ltid );
|
||||||
op->o_private = NULL;
|
op->o_private = NULL;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -302,6 +302,8 @@ sameido:
|
||||||
return rs->sr_err;
|
return rs->sr_err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef BDB_PSEARCH
|
||||||
|
|
||||||
#define is_sync_protocol(op) \
|
#define is_sync_protocol(op) \
|
||||||
((op)->o_sync_mode & SLAP_SYNC_REFRESH_AND_PERSIST)
|
((op)->o_sync_mode & SLAP_SYNC_REFRESH_AND_PERSIST)
|
||||||
|
|
||||||
|
|
@ -595,6 +597,12 @@ int bdb_psearch( Operation *op, SlapReply *rs, Operation *sop,
|
||||||
return LDAP_OTHER;
|
return LDAP_OTHER;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
int bdb_search( Operation *op, SlapReply *rs )
|
||||||
|
{
|
||||||
|
return bdb_do_search( op, rs, op, NULL, 0 );
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* For persistent searches, op is the currently executing operation,
|
/* For persistent searches, op is the currently executing operation,
|
||||||
* sop is the persistent search. For regular searches, sop = op.
|
* sop is the persistent search. For regular searches, sop = op.
|
||||||
|
|
@ -617,6 +625,12 @@ bdb_do_search( Operation *op, SlapReply *rs, Operation *sop,
|
||||||
ID lastid = NOID;
|
ID lastid = NOID;
|
||||||
AttributeName *attrs;
|
AttributeName *attrs;
|
||||||
|
|
||||||
|
u_int32_t locker = 0;
|
||||||
|
DB_LOCK lock;
|
||||||
|
struct bdb_op_info *opinfo = NULL;
|
||||||
|
DB_TXN *ltid = NULL;
|
||||||
|
|
||||||
|
#ifdef BDB_PSEARCH
|
||||||
Filter contextcsnand, contextcsnle, cookief, csnfnot,
|
Filter contextcsnand, contextcsnle, cookief, csnfnot,
|
||||||
csnfeq, csnfand, csnfge;
|
csnfeq, csnfand, csnfge;
|
||||||
AttributeAssertion aa_ge, aa_eq, aa_le;
|
AttributeAssertion aa_ge, aa_eq, aa_le;
|
||||||
|
|
@ -630,8 +644,6 @@ bdb_do_search( Operation *op, SlapReply *rs, Operation *sop,
|
||||||
AttributeName null_attr;
|
AttributeName null_attr;
|
||||||
int no_sync_state_change = 0;
|
int no_sync_state_change = 0;
|
||||||
|
|
||||||
u_int32_t locker = 0;
|
|
||||||
DB_LOCK lock;
|
|
||||||
|
|
||||||
Operation *ps_list;
|
Operation *ps_list;
|
||||||
int sync_send_present_mode = 1;
|
int sync_send_present_mode = 1;
|
||||||
|
|
@ -644,14 +656,14 @@ bdb_do_search( Operation *op, SlapReply *rs, Operation *sop,
|
||||||
BerVarray syncUUID_set = NULL;
|
BerVarray syncUUID_set = NULL;
|
||||||
int syncUUID_set_cnt = 0;
|
int syncUUID_set_cnt = 0;
|
||||||
|
|
||||||
struct bdb_op_info *opinfo = NULL;
|
#endif
|
||||||
DB_TXN *ltid = NULL;
|
|
||||||
|
|
||||||
Debug( LDAP_DEBUG_TRACE, "=> " LDAP_XSTRING(bdb_search) "\n", 0, 0, 0);
|
Debug( LDAP_DEBUG_TRACE, "=> " LDAP_XSTRING(bdb_search) "\n", 0, 0, 0);
|
||||||
attrs = sop->oq_search.rs_attrs;
|
attrs = sop->oq_search.rs_attrs;
|
||||||
|
|
||||||
opinfo = (struct bdb_op_info *) op->o_private;
|
opinfo = (struct bdb_op_info *) op->o_private;
|
||||||
|
|
||||||
|
#ifdef BDB_PSEARCH
|
||||||
if ( !IS_POST_SEARCH && !IS_PSEARCH &&
|
if ( !IS_POST_SEARCH && !IS_PSEARCH &&
|
||||||
sop->o_sync_mode & SLAP_SYNC_REFRESH_AND_PERSIST ) {
|
sop->o_sync_mode & SLAP_SYNC_REFRESH_AND_PERSIST ) {
|
||||||
struct slap_session_entry *sent;
|
struct slap_session_entry *sent;
|
||||||
|
|
@ -732,9 +744,11 @@ bdb_do_search( Operation *op, SlapReply *rs, Operation *sop,
|
||||||
attrs[0].an_oc_exclude = 0;
|
attrs[0].an_oc_exclude = 0;
|
||||||
BER_BVZERO( &attrs[0].an_name );
|
BER_BVZERO( &attrs[0].an_name );
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
manageDSAit = get_manageDSAit( sop );
|
manageDSAit = get_manageDSAit( sop );
|
||||||
|
|
||||||
|
#ifdef BDB_PSEARCH
|
||||||
/* Sync control overrides manageDSAit */
|
/* Sync control overrides manageDSAit */
|
||||||
if ( !IS_PSEARCH && sop->o_sync_mode & SLAP_SYNC_REFRESH ) {
|
if ( !IS_PSEARCH && sop->o_sync_mode & SLAP_SYNC_REFRESH ) {
|
||||||
if ( manageDSAit == SLAP_CONTROL_NONE ) {
|
if ( manageDSAit == SLAP_CONTROL_NONE ) {
|
||||||
|
|
@ -745,6 +759,7 @@ bdb_do_search( Operation *op, SlapReply *rs, Operation *sop,
|
||||||
manageDSAit = SLAP_CONTROL_CRITICAL;
|
manageDSAit = SLAP_CONTROL_CRITICAL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if ( opinfo && opinfo->boi_txn ) {
|
if ( opinfo && opinfo->boi_txn ) {
|
||||||
ltid = opinfo->boi_txn;
|
ltid = opinfo->boi_txn;
|
||||||
|
|
@ -761,6 +776,7 @@ bdb_do_search( Operation *op, SlapReply *rs, Operation *sop,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef BDB_PSEARCH
|
||||||
if ( IS_POST_SEARCH ) {
|
if ( IS_POST_SEARCH ) {
|
||||||
cursor = 0;
|
cursor = 0;
|
||||||
candidates[0] = 1;
|
candidates[0] = 1;
|
||||||
|
|
@ -768,6 +784,7 @@ bdb_do_search( Operation *op, SlapReply *rs, Operation *sop,
|
||||||
search_context_csn = ber_dupbv( NULL, &op->o_sync_csn );
|
search_context_csn = ber_dupbv( NULL, &op->o_sync_csn );
|
||||||
goto loop_start;
|
goto loop_start;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if ( sop->o_req_ndn.bv_len == 0 ) {
|
if ( sop->o_req_ndn.bv_len == 0 ) {
|
||||||
/* DIT root special case */
|
/* DIT root special case */
|
||||||
|
|
@ -918,6 +935,7 @@ dn2entry_retry:
|
||||||
}
|
}
|
||||||
e = NULL;
|
e = NULL;
|
||||||
|
|
||||||
|
#ifdef BDB_PSEARCH
|
||||||
if ( !IS_PSEARCH ) {
|
if ( !IS_PSEARCH ) {
|
||||||
rs->sr_err = bdb_get_commit_csn( sop, rs, &search_context_csn,
|
rs->sr_err = bdb_get_commit_csn( sop, rs, &search_context_csn,
|
||||||
locker, &ctxcsn_lock );
|
locker, &ctxcsn_lock );
|
||||||
|
|
@ -939,6 +957,7 @@ dn2entry_retry:
|
||||||
} else {
|
} else {
|
||||||
search_context_csn = ber_dupbv( NULL, &op->o_sync_csn );
|
search_context_csn = ber_dupbv( NULL, &op->o_sync_csn );
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* select candidates */
|
/* select candidates */
|
||||||
if ( sop->oq_search.rs_scope == LDAP_SCOPE_BASE ) {
|
if ( sop->oq_search.rs_scope == LDAP_SCOPE_BASE ) {
|
||||||
|
|
@ -951,13 +970,16 @@ dn2entry_retry:
|
||||||
locker, candidates, scopes );
|
locker, candidates, scopes );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef BDB_PSEARCH
|
||||||
if ( !IS_PSEARCH && sop->o_sync_mode != SLAP_SYNC_NONE ) {
|
if ( !IS_PSEARCH && sop->o_sync_mode != SLAP_SYNC_NONE ) {
|
||||||
bdb_cache_entry_db_unlock( bdb->bi_dbenv, &ctxcsn_lock );
|
bdb_cache_entry_db_unlock( bdb->bi_dbenv, &ctxcsn_lock );
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* start cursor at beginning of candidates.
|
/* start cursor at beginning of candidates.
|
||||||
*/
|
*/
|
||||||
cursor = 0;
|
cursor = 0;
|
||||||
|
#ifdef BDB_PSEARCH
|
||||||
if (IS_PSEARCH) {
|
if (IS_PSEARCH) {
|
||||||
if ( !BDB_IDL_IS_RANGE( candidates ) ) {
|
if ( !BDB_IDL_IS_RANGE( candidates ) ) {
|
||||||
cursor = bdb_idl_search( candidates, ps_e->e_id );
|
cursor = bdb_idl_search( candidates, ps_e->e_id );
|
||||||
|
|
@ -974,6 +996,7 @@ dn2entry_retry:
|
||||||
candidates[0] = 1;
|
candidates[0] = 1;
|
||||||
candidates[1] = ps_e->e_id;
|
candidates[1] = ps_e->e_id;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if ( candidates[0] == 0 ) {
|
if ( candidates[0] == 0 ) {
|
||||||
Debug( LDAP_DEBUG_TRACE,
|
Debug( LDAP_DEBUG_TRACE,
|
||||||
|
|
@ -1041,6 +1064,7 @@ dn2entry_retry:
|
||||||
goto loop_begin;
|
goto loop_begin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef BDB_PSEARCH
|
||||||
if (( sop->o_sync_mode & SLAP_SYNC_REFRESH ) || IS_PSEARCH ) {
|
if (( sop->o_sync_mode & SLAP_SYNC_REFRESH ) || IS_PSEARCH ) {
|
||||||
int match;
|
int match;
|
||||||
|
|
||||||
|
|
@ -1103,18 +1127,23 @@ dn2entry_retry:
|
||||||
csnfge.f_next = sop->oq_search.rs_filter;
|
csnfge.f_next = sop->oq_search.rs_filter;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
loop_start:
|
loop_start:
|
||||||
|
|
||||||
for ( id = bdb_idl_first( candidates, &cursor );
|
for ( id = bdb_idl_first( candidates, &cursor );
|
||||||
id != NOID && !no_sync_state_change;
|
id != NOID
|
||||||
id = bdb_idl_next( candidates, &cursor ) )
|
#ifdef BDB_PSEARCH
|
||||||
|
&& !no_sync_state_change
|
||||||
|
#endif
|
||||||
|
; id = bdb_idl_next( candidates, &cursor ) )
|
||||||
{
|
{
|
||||||
int scopeok = 0;
|
int scopeok = 0;
|
||||||
ID* idhole = NULL;
|
ID* idhole = NULL;
|
||||||
|
|
||||||
loop_begin:
|
loop_begin:
|
||||||
|
|
||||||
|
#ifdef BDB_PSEARCH
|
||||||
if ( !IS_POST_SEARCH ) {
|
if ( !IS_POST_SEARCH ) {
|
||||||
idhole = (ID*) avl_find( sop->o_psearch_finished,
|
idhole = (ID*) avl_find( sop->o_psearch_finished,
|
||||||
(caddr_t)&id, bdb_pfid_cmp );
|
(caddr_t)&id, bdb_pfid_cmp );
|
||||||
|
|
@ -1179,6 +1208,13 @@ loop_begin:
|
||||||
rs->sr_err = LDAP_SUCCESS;
|
rs->sr_err = LDAP_SUCCESS;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
/* check for abandon */
|
||||||
|
if ( sop->o_abandon ) {
|
||||||
|
rs->sr_err = LDAP_SUCCESS;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* check time limit */
|
/* check time limit */
|
||||||
if ( sop->ors_tlimit != SLAP_NO_LIMIT
|
if ( sop->ors_tlimit != SLAP_NO_LIMIT
|
||||||
|
|
@ -1191,7 +1227,9 @@ loop_begin:
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef BDB_PSEARCH
|
||||||
if (!IS_PSEARCH) {
|
if (!IS_PSEARCH) {
|
||||||
|
#endif
|
||||||
id2entry_retry:
|
id2entry_retry:
|
||||||
/* get the entry with reader lock */
|
/* get the entry with reader lock */
|
||||||
ei = NULL;
|
ei = NULL;
|
||||||
|
|
@ -1216,11 +1254,14 @@ id2entry_retry:
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( e == NULL ) {
|
if ( e == NULL ) {
|
||||||
|
#ifdef BDB_PSEARCH
|
||||||
if ( IS_POST_SEARCH ) {
|
if ( IS_POST_SEARCH ) {
|
||||||
/* send LDAP_SYNC_DELETE */
|
/* send LDAP_SYNC_DELETE */
|
||||||
rs->sr_entry = e = ps_e;
|
rs->sr_entry = e = ps_e;
|
||||||
goto post_search_no_entry;
|
goto post_search_no_entry;
|
||||||
} else if( !BDB_IDL_IS_RANGE(candidates) ) {
|
} else
|
||||||
|
#endif
|
||||||
|
if( !BDB_IDL_IS_RANGE(candidates) ) {
|
||||||
/* only complain for non-range IDLs */
|
/* only complain for non-range IDLs */
|
||||||
Debug( LDAP_DEBUG_TRACE,
|
Debug( LDAP_DEBUG_TRACE,
|
||||||
LDAP_XSTRING(bdb_search)
|
LDAP_XSTRING(bdb_search)
|
||||||
|
|
@ -1230,9 +1271,11 @@ id2entry_retry:
|
||||||
|
|
||||||
goto loop_continue;
|
goto loop_continue;
|
||||||
}
|
}
|
||||||
|
#ifdef BDB_PSEARCH
|
||||||
} else {
|
} else {
|
||||||
e = ps_e;
|
e = ps_e;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
rs->sr_entry = e;
|
rs->sr_entry = e;
|
||||||
|
|
||||||
|
|
@ -1331,7 +1374,12 @@ id2entry_retry:
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Not in scope, ignore it */
|
/* Not in scope, ignore it */
|
||||||
if ( !IS_POST_SEARCH && !scopeok ) {
|
#ifdef BDB_PSEARCH
|
||||||
|
if ( !IS_POST_SEARCH && !scopeok )
|
||||||
|
#else
|
||||||
|
if ( !scopeok )
|
||||||
|
#endif
|
||||||
|
{
|
||||||
Debug( LDAP_DEBUG_TRACE,
|
Debug( LDAP_DEBUG_TRACE,
|
||||||
LDAP_XSTRING(bdb_search)
|
LDAP_XSTRING(bdb_search)
|
||||||
": %ld scope not okay\n",
|
": %ld scope not okay\n",
|
||||||
|
|
@ -1366,6 +1414,9 @@ id2entry_retry:
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if it matches the filter and scope, send it */
|
/* if it matches the filter and scope, send it */
|
||||||
|
#ifndef BDB_PSEARCH
|
||||||
|
rs->sr_err = test_filter( sop, rs->sr_entry, sop->oq_search.rs_filter );
|
||||||
|
#else
|
||||||
if (IS_PSEARCH) {
|
if (IS_PSEARCH) {
|
||||||
if (ps_type != LDAP_PSEARCH_BY_SCOPEOUT) {
|
if (ps_type != LDAP_PSEARCH_BY_SCOPEOUT) {
|
||||||
rs->sr_err = test_filter( sop, rs->sr_entry, &cookief );
|
rs->sr_err = test_filter( sop, rs->sr_entry, &cookief );
|
||||||
|
|
@ -1409,16 +1460,23 @@ id2entry_retry:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if ( rs->sr_err == LDAP_COMPARE_TRUE ) {
|
if ( rs->sr_err == LDAP_COMPARE_TRUE ) {
|
||||||
/* check size limit */
|
/* check size limit */
|
||||||
if ( --sop->ors_slimit == -1 &&
|
if ( --sop->ors_slimit == -1
|
||||||
sop->o_sync_slog_size == -1 )
|
#ifdef BDB_PSEARCH
|
||||||
{
|
&& sop->o_sync_slog_size == -1
|
||||||
|
#endif
|
||||||
|
) {
|
||||||
|
#ifdef BDB_PSEARCH
|
||||||
if (!IS_PSEARCH) {
|
if (!IS_PSEARCH) {
|
||||||
|
#endif
|
||||||
bdb_cache_return_entry_r( bdb->bi_dbenv,
|
bdb_cache_return_entry_r( bdb->bi_dbenv,
|
||||||
&bdb->bi_cache, e, &lock );
|
&bdb->bi_cache, e, &lock );
|
||||||
|
#ifdef BDB_PSEARCH
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
e = NULL;
|
e = NULL;
|
||||||
rs->sr_entry = NULL;
|
rs->sr_entry = NULL;
|
||||||
rs->sr_err = LDAP_SIZELIMIT_EXCEEDED;
|
rs->sr_err = LDAP_SIZELIMIT_EXCEEDED;
|
||||||
|
|
@ -1439,7 +1497,7 @@ id2entry_retry:
|
||||||
if (e) {
|
if (e) {
|
||||||
/* safe default */
|
/* safe default */
|
||||||
int result = -1;
|
int result = -1;
|
||||||
|
#ifdef BDB_PSEARCH
|
||||||
if (IS_PSEARCH || IS_POST_SEARCH) {
|
if (IS_PSEARCH || IS_POST_SEARCH) {
|
||||||
int premodify_found = 0;
|
int premodify_found = 0;
|
||||||
|
|
||||||
|
|
@ -1592,14 +1650,17 @@ post_search_no_entry:
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
#endif
|
||||||
rs->sr_attrs = sop->oq_search.rs_attrs;
|
rs->sr_attrs = sop->oq_search.rs_attrs;
|
||||||
rs->sr_operational_attrs = NULL;
|
rs->sr_operational_attrs = NULL;
|
||||||
rs->sr_ctrls = NULL;
|
rs->sr_ctrls = NULL;
|
||||||
rs->sr_flags = 0;
|
rs->sr_flags = 0;
|
||||||
rs->sr_err = LDAP_SUCCESS;
|
rs->sr_err = LDAP_SUCCESS;
|
||||||
result = send_search_entry( sop, rs );
|
result = send_search_entry( sop, rs );
|
||||||
|
#ifdef BDB_PSEARCH
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
switch (result) {
|
switch (result) {
|
||||||
case 0: /* entry sent ok */
|
case 0: /* entry sent ok */
|
||||||
|
|
@ -1607,10 +1668,14 @@ post_search_no_entry:
|
||||||
case 1: /* entry not sent */
|
case 1: /* entry not sent */
|
||||||
break;
|
break;
|
||||||
case -1: /* connection closed */
|
case -1: /* connection closed */
|
||||||
|
#ifdef BDB_PSEARCH
|
||||||
if (!IS_PSEARCH) {
|
if (!IS_PSEARCH) {
|
||||||
|
#endif
|
||||||
bdb_cache_return_entry_r(bdb->bi_dbenv,
|
bdb_cache_return_entry_r(bdb->bi_dbenv,
|
||||||
&bdb->bi_cache, e, &lock);
|
&bdb->bi_cache, e, &lock);
|
||||||
|
#ifdef BDB_PSEARCH
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
e = NULL;
|
e = NULL;
|
||||||
rs->sr_entry = NULL;
|
rs->sr_entry = NULL;
|
||||||
rs->sr_err = LDAP_OTHER;
|
rs->sr_err = LDAP_OTHER;
|
||||||
|
|
@ -1628,6 +1693,7 @@ post_search_no_entry:
|
||||||
loop_continue:
|
loop_continue:
|
||||||
if( e != NULL ) {
|
if( e != NULL ) {
|
||||||
/* free reader lock */
|
/* free reader lock */
|
||||||
|
#ifdef BDB_PSEARCH
|
||||||
if (!IS_PSEARCH) {
|
if (!IS_PSEARCH) {
|
||||||
if (!(IS_POST_SEARCH &&
|
if (!(IS_POST_SEARCH &&
|
||||||
entry_sync_state == LDAP_SYNC_DELETE)) {
|
entry_sync_state == LDAP_SYNC_DELETE)) {
|
||||||
|
|
@ -1638,19 +1704,26 @@ loop_continue:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
bdb_cache_return_entry_r( bdb->bi_dbenv,
|
||||||
|
&bdb->bi_cache, e , &lock );
|
||||||
|
#endif
|
||||||
e = NULL;
|
e = NULL;
|
||||||
rs->sr_entry = NULL;
|
rs->sr_entry = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef BDB_PSEARCH
|
||||||
if ( sop->o_refresh_in_progress ) {
|
if ( sop->o_refresh_in_progress ) {
|
||||||
if ( pce ) {
|
if ( pce ) {
|
||||||
pce->pc_sent = 1;
|
pce->pc_sent = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
ldap_pvt_thread_yield();
|
ldap_pvt_thread_yield();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef BDB_PSEARCH
|
||||||
if ( syncUUID_set_cnt > 0 ) {
|
if ( syncUUID_set_cnt > 0 ) {
|
||||||
rs->sr_err = LDAP_SUCCESS;
|
rs->sr_err = LDAP_SUCCESS;
|
||||||
rs->sr_rspoid = LDAP_SYNC_INFO;
|
rs->sr_rspoid = LDAP_SYNC_INFO;
|
||||||
|
|
@ -1660,8 +1733,10 @@ loop_continue:
|
||||||
ber_bvarray_free_x( syncUUID_set, sop->o_tmpmemctx );
|
ber_bvarray_free_x( syncUUID_set, sop->o_tmpmemctx );
|
||||||
syncUUID_set_cnt = 0;
|
syncUUID_set_cnt = 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
nochange:
|
nochange:
|
||||||
|
#ifdef BDB_PSEARCH
|
||||||
if (!IS_PSEARCH && !IS_POST_SEARCH) {
|
if (!IS_PSEARCH && !IS_POST_SEARCH) {
|
||||||
if ( sop->o_sync_mode & SLAP_SYNC_REFRESH ) {
|
if ( sop->o_sync_mode & SLAP_SYNC_REFRESH ) {
|
||||||
if ( sop->o_sync_mode & SLAP_SYNC_PERSIST ) {
|
if ( sop->o_sync_mode & SLAP_SYNC_PERSIST ) {
|
||||||
|
|
@ -1763,6 +1838,7 @@ nochange:
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
#endif
|
||||||
rs->sr_ctrls = NULL;
|
rs->sr_ctrls = NULL;
|
||||||
rs->sr_ref = rs->sr_v2ref;
|
rs->sr_ref = rs->sr_v2ref;
|
||||||
rs->sr_err = (rs->sr_v2ref == NULL) ? LDAP_SUCCESS : LDAP_REFERRAL;
|
rs->sr_err = (rs->sr_v2ref == NULL) ? LDAP_SUCCESS : LDAP_REFERRAL;
|
||||||
|
|
@ -1772,16 +1848,19 @@ nochange:
|
||||||
} else {
|
} else {
|
||||||
send_ldap_result( sop, rs );
|
send_ldap_result( sop, rs );
|
||||||
}
|
}
|
||||||
|
#ifdef BDB_PSEARCH
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( sop->o_refresh_in_progress ) {
|
if ( sop->o_refresh_in_progress ) {
|
||||||
sop->o_refresh_in_progress = 0;
|
sop->o_refresh_in_progress = 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
rs->sr_err = LDAP_SUCCESS;
|
rs->sr_err = LDAP_SUCCESS;
|
||||||
|
|
||||||
done:
|
done:
|
||||||
|
#ifdef BDB_PSEARCH
|
||||||
if ( sop->o_psearch_finished ) {
|
if ( sop->o_psearch_finished ) {
|
||||||
avl_free( sop->o_psearch_finished, ch_free );
|
avl_free( sop->o_psearch_finished, ch_free );
|
||||||
}
|
}
|
||||||
|
|
@ -1790,12 +1869,15 @@ done:
|
||||||
/* free reader lock */
|
/* free reader lock */
|
||||||
bdb_cache_return_entry_r( bdb->bi_dbenv, &bdb->bi_cache, e, &lock );
|
bdb_cache_return_entry_r( bdb->bi_dbenv, &bdb->bi_cache, e, &lock );
|
||||||
}
|
}
|
||||||
|
ber_bvfree( search_context_csn );
|
||||||
|
|
||||||
|
#else
|
||||||
|
bdb_cache_return_entry_r( bdb->bi_dbenv, &bdb->bi_cache, e, &lock );
|
||||||
|
#endif
|
||||||
|
|
||||||
if ( !opinfo )
|
if ( !opinfo )
|
||||||
LOCK_ID_FREE( bdb->bi_dbenv, locker );
|
LOCK_ID_FREE( bdb->bi_dbenv, locker );
|
||||||
|
|
||||||
ber_bvfree( search_context_csn );
|
|
||||||
|
|
||||||
if( rs->sr_v2ref ) {
|
if( rs->sr_v2ref ) {
|
||||||
ber_bvarray_free( rs->sr_v2ref );
|
ber_bvarray_free( rs->sr_v2ref );
|
||||||
rs->sr_v2ref = NULL;
|
rs->sr_v2ref = NULL;
|
||||||
|
|
@ -1923,8 +2005,10 @@ static int search_candidates(
|
||||||
*/
|
*/
|
||||||
if (!oc_filter(op->oq_search.rs_filter, 1, &depth)
|
if (!oc_filter(op->oq_search.rs_filter, 1, &depth)
|
||||||
&& !get_subentries_visibility(op)
|
&& !get_subentries_visibility(op)
|
||||||
&& !is_sync_protocol(op) )
|
#ifdef BDB_PSEARCH
|
||||||
{
|
&& !is_sync_protocol(op)
|
||||||
|
#endif
|
||||||
|
) {
|
||||||
if( !get_manageDSAit(op) && !get_domainScope(op) ) {
|
if( !get_manageDSAit(op) && !get_domainScope(op) ) {
|
||||||
/* match referral objects */
|
/* match referral objects */
|
||||||
struct berval bv_ref = BER_BVC( "referral" );
|
struct berval bv_ref = BER_BVC( "referral" );
|
||||||
|
|
|
||||||
|
|
@ -1073,12 +1073,14 @@ operations_error:
|
||||||
{
|
{
|
||||||
slap_sl_mem_detach( ctx, memctx );
|
slap_sl_mem_detach( ctx, memctx );
|
||||||
|
|
||||||
|
#if 0
|
||||||
} else if ( op->o_sync_slog_size != -1 ) {
|
} else if ( op->o_sync_slog_size != -1 ) {
|
||||||
slap_sl_mem_detach( ctx, memctx );
|
slap_sl_mem_detach( ctx, memctx );
|
||||||
LDAP_STAILQ_REMOVE( &conn->c_ops, op, slap_op, o_next);
|
LDAP_STAILQ_REMOVE( &conn->c_ops, op, slap_op, o_next);
|
||||||
LDAP_STAILQ_NEXT(op, o_next) = NULL;
|
LDAP_STAILQ_NEXT(op, o_next) = NULL;
|
||||||
conn->c_n_ops_executing--;
|
conn->c_n_ops_executing--;
|
||||||
conn->c_n_ops_completed++;
|
conn->c_n_ops_completed++;
|
||||||
|
#endif
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
LDAP_STAILQ_REMOVE( &conn->c_ops, op, slap_op, o_next);
|
LDAP_STAILQ_REMOVE( &conn->c_ops, op, slap_op, o_next);
|
||||||
|
|
|
||||||
|
|
@ -1296,6 +1296,9 @@ static int parseLDAPsync (
|
||||||
ber_int_t mode;
|
ber_int_t mode;
|
||||||
ber_len_t len;
|
ber_len_t len;
|
||||||
struct slap_session_entry *se;
|
struct slap_session_entry *se;
|
||||||
|
struct berval cookie = BER_BVNULL;
|
||||||
|
syncrepl_state *sr;
|
||||||
|
int rhint = 0;
|
||||||
|
|
||||||
if ( op->o_sync != SLAP_CONTROL_NONE ) {
|
if ( op->o_sync != SLAP_CONTROL_NONE ) {
|
||||||
rs->sr_text = "Sync control specified multiple times";
|
rs->sr_text = "Sync control specified multiple times";
|
||||||
|
|
@ -1351,16 +1354,13 @@ static int parseLDAPsync (
|
||||||
tag = ber_peek_tag( ber, &len );
|
tag = ber_peek_tag( ber, &len );
|
||||||
|
|
||||||
if ( tag == LDAP_TAG_SYNC_COOKIE ) {
|
if ( tag == LDAP_TAG_SYNC_COOKIE ) {
|
||||||
struct berval tmp_bv;
|
if (( ber_scanf( ber, /*{*/ "o", &cookie )) == LBER_ERROR ) {
|
||||||
if (( ber_scanf( ber, /*{*/ "o", &tmp_bv )) == LBER_ERROR ) {
|
|
||||||
rs->sr_text = "Sync control : cookie decoding error";
|
rs->sr_text = "Sync control : cookie decoding error";
|
||||||
return LDAP_PROTOCOL_ERROR;
|
return LDAP_PROTOCOL_ERROR;
|
||||||
}
|
}
|
||||||
ber_bvarray_add( &op->o_sync_state.octet_str, &tmp_bv );
|
|
||||||
slap_parse_sync_cookie( &op->o_sync_state );
|
|
||||||
}
|
}
|
||||||
if ( tag == LDAP_TAG_RELOAD_HINT ) {
|
if ( tag == LDAP_TAG_RELOAD_HINT ) {
|
||||||
if (( ber_scanf( ber, /*{*/ "b", &op->o_sync_rhint )) == LBER_ERROR ) {
|
if (( ber_scanf( ber, /*{*/ "b", &rhint )) == LBER_ERROR ) {
|
||||||
rs->sr_text = "Sync control : rhint decoding error";
|
rs->sr_text = "Sync control : rhint decoding error";
|
||||||
return LDAP_PROTOCOL_ERROR;
|
return LDAP_PROTOCOL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
@ -1369,6 +1369,14 @@ static int parseLDAPsync (
|
||||||
rs->sr_text = "Sync control : decoding error";
|
rs->sr_text = "Sync control : decoding error";
|
||||||
return LDAP_PROTOCOL_ERROR;
|
return LDAP_PROTOCOL_ERROR;
|
||||||
}
|
}
|
||||||
|
sr = op->o_tmpcalloc( 1, sizeof(struct syncrepl_state), op->o_tmpmemctx );
|
||||||
|
sr->sr_rhint = rhint;
|
||||||
|
if (!BER_BVISNULL(&cookie)) {
|
||||||
|
ber_bvarray_add( &sr->sr_state.octet_str, &cookie );
|
||||||
|
slap_parse_sync_cookie( &sr->sr_state );
|
||||||
|
}
|
||||||
|
|
||||||
|
op->o_controls[slap_cids.sc_LDAPsync] = sr;
|
||||||
|
|
||||||
(void) ber_free( ber, 1 );
|
(void) ber_free( ber, 1 );
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -159,8 +159,10 @@ slap_get_csn(
|
||||||
pending = (struct slap_csn_entry *) ch_calloc( 1,
|
pending = (struct slap_csn_entry *) ch_calloc( 1,
|
||||||
sizeof( struct slap_csn_entry ));
|
sizeof( struct slap_csn_entry ));
|
||||||
ldap_pvt_thread_mutex_lock( op->o_bd->be_pcl_mutexp );
|
ldap_pvt_thread_mutex_lock( op->o_bd->be_pcl_mutexp );
|
||||||
|
#if 0
|
||||||
if ( op->o_sync_csn.bv_val ) free( op->o_sync_csn.bv_val );
|
if ( op->o_sync_csn.bv_val ) free( op->o_sync_csn.bv_val );
|
||||||
ber_dupbv( &op->o_sync_csn, csn );
|
ber_dupbv( &op->o_sync_csn, csn );
|
||||||
|
#endif
|
||||||
pending->ce_csn = ber_dupbv( NULL, csn );
|
pending->ce_csn = ber_dupbv( NULL, csn );
|
||||||
pending->ce_connid = op->o_connid;
|
pending->ce_connid = op->o_connid;
|
||||||
pending->ce_opid = op->o_opid;
|
pending->ce_opid = op->o_opid;
|
||||||
|
|
|
||||||
|
|
@ -89,8 +89,6 @@ slap_op_free( Operation *op )
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
slap_sync_cookie_free( &op->o_sync_state, 0 );
|
|
||||||
|
|
||||||
{
|
{
|
||||||
GroupAssertion *g, *n;
|
GroupAssertion *g, *n;
|
||||||
for (g = op->o_groups; g; g=n) {
|
for (g = op->o_groups; g; g=n) {
|
||||||
|
|
@ -107,18 +105,22 @@ slap_op_free( Operation *op )
|
||||||
}
|
}
|
||||||
#endif /* defined( LDAP_SLAPI ) */
|
#endif /* defined( LDAP_SLAPI ) */
|
||||||
|
|
||||||
if ( op->o_sync_csn.bv_val != NULL ) {
|
|
||||||
ch_free( op->o_sync_csn.bv_val );
|
|
||||||
}
|
|
||||||
|
|
||||||
controls = op->o_controls;
|
controls = op->o_controls;
|
||||||
memset( controls, 0, sizeof(void *) * SLAP_MAX_CIDS );
|
memset( controls, 0, sizeof(void *) * SLAP_MAX_CIDS );
|
||||||
memset( op, 0, sizeof(Operation) );
|
memset( op, 0, sizeof(Operation) );
|
||||||
op->o_controls = controls;
|
op->o_controls = controls;
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
slap_sync_cookie_free( &op->o_sync_state, 0 );
|
||||||
|
if ( op->o_sync_csn.bv_val != NULL ) {
|
||||||
|
ch_free( op->o_sync_csn.bv_val );
|
||||||
|
}
|
||||||
op->o_sync_state.sid = -1;
|
op->o_sync_state.sid = -1;
|
||||||
op->o_sync_slog_size = -1;
|
op->o_sync_slog_size = -1;
|
||||||
op->o_sync_state.rid = -1;
|
op->o_sync_state.rid = -1;
|
||||||
|
#endif
|
||||||
|
|
||||||
ldap_pvt_thread_mutex_lock( &slap_op_mutex );
|
ldap_pvt_thread_mutex_lock( &slap_op_mutex );
|
||||||
LDAP_STAILQ_INSERT_HEAD( &slap_free_ops, op, o_next );
|
LDAP_STAILQ_INSERT_HEAD( &slap_free_ops, op, o_next );
|
||||||
ldap_pvt_thread_mutex_unlock( &slap_op_mutex );
|
ldap_pvt_thread_mutex_unlock( &slap_op_mutex );
|
||||||
|
|
@ -154,11 +156,13 @@ slap_op_alloc(
|
||||||
op->o_opid = id;
|
op->o_opid = id;
|
||||||
op->o_res_ber = NULL;
|
op->o_res_ber = NULL;
|
||||||
|
|
||||||
|
#if 0
|
||||||
op->o_sync_state.sid = -1;
|
op->o_sync_state.sid = -1;
|
||||||
op->o_sync_slog_size = -1;
|
op->o_sync_slog_size = -1;
|
||||||
op->o_sync_state.rid = -1;
|
op->o_sync_state.rid = -1;
|
||||||
LDAP_STAILQ_FIRST( &op->o_sync_slog_list ) = NULL;
|
LDAP_STAILQ_FIRST( &op->o_sync_slog_list ) = NULL;
|
||||||
op->o_sync_slog_list.stqh_last = &LDAP_STAILQ_FIRST( &op->o_sync_slog_list );
|
op->o_sync_slog_list.stqh_last = &LDAP_STAILQ_FIRST( &op->o_sync_slog_list );
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined( LDAP_SLAPI )
|
#if defined( LDAP_SLAPI )
|
||||||
if ( slapi_plugins_used ) {
|
if ( slapi_plugins_used ) {
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ SRCS = overlays.c \
|
||||||
ppolicy.c \
|
ppolicy.c \
|
||||||
refint.c \
|
refint.c \
|
||||||
rwm.c rwmconf.c rwmdn.c rwmmap.c \
|
rwm.c rwmconf.c rwmdn.c rwmmap.c \
|
||||||
|
syncprov.c \
|
||||||
unique.c
|
unique.c
|
||||||
OBJS = overlays.lo \
|
OBJS = overlays.lo \
|
||||||
chain.lo \
|
chain.lo \
|
||||||
|
|
@ -32,6 +33,7 @@ OBJS = overlays.lo \
|
||||||
ppolicy.lo \
|
ppolicy.lo \
|
||||||
refint.lo \
|
refint.lo \
|
||||||
rwm.lo rwmconf.lo rwmdn.lo rwmmap.lo \
|
rwm.lo rwmconf.lo rwmdn.lo rwmmap.lo \
|
||||||
|
syncprov.lo \
|
||||||
unique.lo
|
unique.lo
|
||||||
|
|
||||||
LDAP_INCDIR= ../../../include
|
LDAP_INCDIR= ../../../include
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,9 @@ extern int refint_init();
|
||||||
#if SLAPD_OVER_RWM == SLAPD_MOD_STATIC
|
#if SLAPD_OVER_RWM == SLAPD_MOD_STATIC
|
||||||
extern int rwm_init();
|
extern int rwm_init();
|
||||||
#endif
|
#endif
|
||||||
|
#if SLAPD_OVER_SYNCPROV == SLAPD_MOD_STATIC
|
||||||
|
extern int syncprov_init();
|
||||||
|
#endif
|
||||||
#if SLAPD_OVER_UNIQUE == SLAPD_MOD_STATIC
|
#if SLAPD_OVER_UNIQUE == SLAPD_MOD_STATIC
|
||||||
extern int unique_init();
|
extern int unique_init();
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -79,6 +82,9 @@ static struct {
|
||||||
#if SLAPD_OVER_RWM == SLAPD_MOD_STATIC
|
#if SLAPD_OVER_RWM == SLAPD_MOD_STATIC
|
||||||
{ "Rewrite/Remap", rwm_init },
|
{ "Rewrite/Remap", rwm_init },
|
||||||
#endif
|
#endif
|
||||||
|
#if SLAPD_OVER_SYNCPROV == SLAPD_MOD_STATIC
|
||||||
|
{ "Syncrepl Provider", syncprov_init },
|
||||||
|
#endif
|
||||||
#if SLAPD_OVER_UNIQUE == SLAPD_MOD_STATIC
|
#if SLAPD_OVER_UNIQUE == SLAPD_MOD_STATIC
|
||||||
{ "Attribute Uniqueness", unique_init },
|
{ "Attribute Uniqueness", unique_init },
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -557,7 +557,6 @@ refint_response(
|
||||||
/* no attrs! */
|
/* no attrs! */
|
||||||
nop.ors_attrs = slap_anlist_no_attrs;
|
nop.ors_attrs = slap_anlist_no_attrs;
|
||||||
nop.ors_attrsonly = 1;
|
nop.ors_attrsonly = 1;
|
||||||
nop.o_sync_slog_size = -1;
|
|
||||||
|
|
||||||
nop.o_req_ndn = id->dn;
|
nop.o_req_ndn = id->dn;
|
||||||
nop.o_req_dn = id->dn;
|
nop.o_req_dn = id->dn;
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,8 @@ typedef struct syncops {
|
||||||
int s_flags; /* search status */
|
int s_flags; /* search status */
|
||||||
} syncops;
|
} syncops;
|
||||||
|
|
||||||
|
static int sync_cid;
|
||||||
|
|
||||||
#define PS_IS_REFRESHING 0x01
|
#define PS_IS_REFRESHING 0x01
|
||||||
|
|
||||||
/* Record of which searches matched at premodify step */
|
/* Record of which searches matched at premodify step */
|
||||||
|
|
@ -212,9 +214,10 @@ findcsn_cb( Operation *op, SlapReply *rs )
|
||||||
if ( sc->sc_private ) {
|
if ( sc->sc_private ) {
|
||||||
int i;
|
int i;
|
||||||
fcsn_cookie *fc = sc->sc_private;
|
fcsn_cookie *fc = sc->sc_private;
|
||||||
|
syncrepl_state *srs = op->o_controls[sync_cid];
|
||||||
Attribute *a = attr_find(rs->sr_entry->e_attrs,
|
Attribute *a = attr_find(rs->sr_entry->e_attrs,
|
||||||
slap_schema.si_ad_entryCSN );
|
slap_schema.si_ad_entryCSN );
|
||||||
i = ber_bvcmp( &a->a_vals[0], op->o_sync_state.ctxcsn );
|
i = ber_bvcmp( &a->a_vals[0], srs->sr_state.ctxcsn );
|
||||||
if ( i == 0 ) fc->gotmatch = 1;
|
if ( i == 0 ) fc->gotmatch = 1;
|
||||||
i = ber_bvcmp( &a->a_vals[0], &fc->maxcsn );
|
i = ber_bvcmp( &a->a_vals[0], &fc->maxcsn );
|
||||||
if ( i > 0 ) {
|
if ( i > 0 ) {
|
||||||
|
|
@ -294,8 +297,9 @@ syncprov_findcsn( Operation *op, int mode )
|
||||||
fcsn_cookie fcookie;
|
fcsn_cookie fcookie;
|
||||||
fpres_cookie pcookie;
|
fpres_cookie pcookie;
|
||||||
int locked = 0;
|
int locked = 0;
|
||||||
|
syncrepl_state *srs = op->o_controls[sync_cid];
|
||||||
|
|
||||||
if ( op->o_sync_state.ctxcsn->bv_len >= LDAP_LUTIL_CSNSTR_BUFSIZE ) {
|
if ( srs->sr_state.ctxcsn->bv_len >= LDAP_LUTIL_CSNSTR_BUFSIZE ) {
|
||||||
return LDAP_OTHER;
|
return LDAP_OTHER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -318,7 +322,7 @@ syncprov_findcsn( Operation *op, int mode )
|
||||||
fcookie.maxcsn.bv_val = cbuf;
|
fcookie.maxcsn.bv_val = cbuf;
|
||||||
fcookie.maxcsn.bv_len = 0;
|
fcookie.maxcsn.bv_len = 0;
|
||||||
fcookie.gotmatch = 0;
|
fcookie.gotmatch = 0;
|
||||||
fbuf.bv_len = sprintf( buf, "(entryCSN>=%s)", op->o_sync_state.ctxcsn->bv_val );
|
fbuf.bv_len = sprintf( buf, "(entryCSN>=%s)", srs->sr_state.ctxcsn->bv_val );
|
||||||
} else {
|
} else {
|
||||||
if ( locked ) {
|
if ( locked ) {
|
||||||
ldap_pvt_thread_mutex_unlock( &si->si_csn_mutex );
|
ldap_pvt_thread_mutex_unlock( &si->si_csn_mutex );
|
||||||
|
|
@ -329,7 +333,7 @@ syncprov_findcsn( Operation *op, int mode )
|
||||||
fop.ors_attrs = slap_anlist_no_attrs;
|
fop.ors_attrs = slap_anlist_no_attrs;
|
||||||
fop.ors_slimit = 1;
|
fop.ors_slimit = 1;
|
||||||
cb.sc_private = NULL;
|
cb.sc_private = NULL;
|
||||||
fbuf.bv_len = sprintf( buf, "(entryCSN<=%s)", op->o_sync_state.ctxcsn->bv_val );
|
fbuf.bv_len = sprintf( buf, "(entryCSN<=%s)", srs->sr_state.ctxcsn->bv_val );
|
||||||
}
|
}
|
||||||
cb.sc_response = findcsn_cb;
|
cb.sc_response = findcsn_cb;
|
||||||
|
|
||||||
|
|
@ -344,11 +348,11 @@ syncprov_findcsn( Operation *op, int mode )
|
||||||
cb.sc_response = findpres_cb;
|
cb.sc_response = findpres_cb;
|
||||||
pcookie.num = 0;
|
pcookie.num = 0;
|
||||||
pcookie.uuids = NULL;
|
pcookie.uuids = NULL;
|
||||||
fbuf.bv_len = sprintf( buf, "(entryCSN<=%s)", op->o_sync_state.ctxcsn->bv_val );
|
fbuf.bv_len = sprintf( buf, "(entryCSN<=%s)", srs->sr_state.ctxcsn->bv_val );
|
||||||
}
|
}
|
||||||
cf.f_ava = &eq;
|
cf.f_ava = &eq;
|
||||||
cf.f_av_desc = slap_schema.si_ad_entryCSN;
|
cf.f_av_desc = slap_schema.si_ad_entryCSN;
|
||||||
cf.f_av_value = *op->o_sync_state.ctxcsn;
|
cf.f_av_value = *srs->sr_state.ctxcsn;
|
||||||
cf.f_next = NULL;
|
cf.f_next = NULL;
|
||||||
|
|
||||||
fop.o_callback = &cb;
|
fop.o_callback = &cb;
|
||||||
|
|
@ -390,12 +394,13 @@ syncprov_sendresp( Operation *op, opcookie *opc, syncops *so, Entry *e, int mode
|
||||||
Entry e_uuid = {0};
|
Entry e_uuid = {0};
|
||||||
Attribute a_uuid = {0};
|
Attribute a_uuid = {0};
|
||||||
Operation sop = *so->s_op;
|
Operation sop = *so->s_op;
|
||||||
|
syncrepl_state *srs = sop.o_controls[sync_cid];
|
||||||
|
|
||||||
sop.o_tmpmemctx = op->o_tmpmemctx;
|
sop.o_tmpmemctx = op->o_tmpmemctx;
|
||||||
|
|
||||||
ctrls[1] = NULL;
|
ctrls[1] = NULL;
|
||||||
slap_compose_sync_cookie( op, &cookie, &opc->sctxcsn,
|
slap_compose_sync_cookie( op, &cookie, &opc->sctxcsn,
|
||||||
sop.o_sync_state.sid, sop.o_sync_state.rid );
|
srs->sr_state.sid, srs->sr_state.rid );
|
||||||
|
|
||||||
e_uuid.e_attrs = &a_uuid;
|
e_uuid.e_attrs = &a_uuid;
|
||||||
a_uuid.a_desc = slap_schema.si_ad_entryUUID;
|
a_uuid.a_desc = slap_schema.si_ad_entryUUID;
|
||||||
|
|
@ -721,14 +726,15 @@ syncprov_search_response( Operation *op, SlapReply *rs )
|
||||||
searchstate *ss = op->o_callback->sc_private;
|
searchstate *ss = op->o_callback->sc_private;
|
||||||
slap_overinst *on = ss->ss_on;
|
slap_overinst *on = ss->ss_on;
|
||||||
syncprov_info_t *si = on->on_bi.bi_private;
|
syncprov_info_t *si = on->on_bi.bi_private;
|
||||||
|
syncrepl_state *srs = op->o_controls[sync_cid];
|
||||||
|
|
||||||
if ( rs->sr_type == REP_SEARCH || rs->sr_type == REP_SEARCHREF ) {
|
if ( rs->sr_type == REP_SEARCH || rs->sr_type == REP_SEARCHREF ) {
|
||||||
int i;
|
int i;
|
||||||
if ( op->o_sync_state.ctxcsn ) {
|
if ( srs->sr_state.ctxcsn ) {
|
||||||
Attribute *a = attr_find( rs->sr_entry->e_attrs,
|
Attribute *a = attr_find( rs->sr_entry->e_attrs,
|
||||||
slap_schema.si_ad_entryCSN );
|
slap_schema.si_ad_entryCSN );
|
||||||
/* Don't send the ctx entry twice */
|
/* Don't send the ctx entry twice */
|
||||||
if ( bvmatch( &a->a_nvals[0], op->o_sync_state.ctxcsn ))
|
if ( bvmatch( &a->a_nvals[0], srs->sr_state.ctxcsn ))
|
||||||
return LDAP_SUCCESS;
|
return LDAP_SUCCESS;
|
||||||
}
|
}
|
||||||
rs->sr_ctrls = op->o_tmpalloc( sizeof(LDAPControl *)*2,
|
rs->sr_ctrls = op->o_tmpalloc( sizeof(LDAPControl *)*2,
|
||||||
|
|
@ -741,7 +747,7 @@ syncprov_search_response( Operation *op, SlapReply *rs )
|
||||||
|
|
||||||
slap_compose_sync_cookie( op, &cookie,
|
slap_compose_sync_cookie( op, &cookie,
|
||||||
&op->ors_filter->f_and->f_ava->aa_value,
|
&op->ors_filter->f_and->f_ava->aa_value,
|
||||||
op->o_sync_state.sid, op->o_sync_state.rid );
|
srs->sr_state.sid, srs->sr_state.rid );
|
||||||
|
|
||||||
/* Is this a regular refresh? */
|
/* Is this a regular refresh? */
|
||||||
if ( !ss->ss_so ) {
|
if ( !ss->ss_so ) {
|
||||||
|
|
@ -783,6 +789,7 @@ syncprov_op_search( Operation *op, SlapReply *rs )
|
||||||
Filter *fand, *fava;
|
Filter *fand, *fava;
|
||||||
syncops *sop = NULL;
|
syncops *sop = NULL;
|
||||||
searchstate *ss;
|
searchstate *ss;
|
||||||
|
syncrepl_state *srs = op->o_controls[sync_cid];
|
||||||
|
|
||||||
if ( !(op->o_sync_mode & SLAP_SYNC_REFRESH) ) return SLAP_CB_CONTINUE;
|
if ( !(op->o_sync_mode & SLAP_SYNC_REFRESH) ) return SLAP_CB_CONTINUE;
|
||||||
|
|
||||||
|
|
@ -825,9 +832,9 @@ syncprov_op_search( Operation *op, SlapReply *rs )
|
||||||
|
|
||||||
/* If we have a cookie, handle the PRESENT lookups
|
/* If we have a cookie, handle the PRESENT lookups
|
||||||
*/
|
*/
|
||||||
if ( op->o_sync_state.ctxcsn ) {
|
if ( srs->sr_state.ctxcsn ) {
|
||||||
/* Is the CSN in a valid format? */
|
/* Is the CSN in a valid format? */
|
||||||
if ( op->o_sync_state.ctxcsn->bv_len >= LDAP_LUTIL_CSNSTR_BUFSIZE ) {
|
if ( srs->sr_state.ctxcsn->bv_len >= LDAP_LUTIL_CSNSTR_BUFSIZE ) {
|
||||||
send_ldap_error( op, rs, LDAP_OTHER, "invalid sync cookie" );
|
send_ldap_error( op, rs, LDAP_OTHER, "invalid sync cookie" );
|
||||||
return rs->sr_err;
|
return rs->sr_err;
|
||||||
}
|
}
|
||||||
|
|
@ -843,7 +850,7 @@ syncprov_op_search( Operation *op, SlapReply *rs )
|
||||||
} else {
|
} else {
|
||||||
gotstate = 1;
|
gotstate = 1;
|
||||||
/* If just Refreshing and nothing has changed, shortcut it */
|
/* If just Refreshing and nothing has changed, shortcut it */
|
||||||
if ( bvmatch( op->o_sync_state.ctxcsn, &si->si_ctxcsn )) {
|
if ( bvmatch( srs->sr_state.ctxcsn, &si->si_ctxcsn )) {
|
||||||
nochange = 1;
|
nochange = 1;
|
||||||
if ( !(op->o_sync_mode & SLAP_SYNC_PERSIST) ) {
|
if ( !(op->o_sync_mode & SLAP_SYNC_PERSIST) ) {
|
||||||
LDAPControl *ctrls[2];
|
LDAPControl *ctrls[2];
|
||||||
|
|
@ -872,10 +879,10 @@ syncprov_op_search( Operation *op, SlapReply *rs )
|
||||||
if ( !gotstate && !si->si_gotcsn ) {
|
if ( !gotstate && !si->si_gotcsn ) {
|
||||||
struct berval bv = BER_BVC("1"), *old;
|
struct berval bv = BER_BVC("1"), *old;
|
||||||
|
|
||||||
old = op->o_sync_state.ctxcsn;
|
old = srs->sr_state.ctxcsn;
|
||||||
op->o_sync_state.ctxcsn = &bv;
|
srs->sr_state.ctxcsn = &bv;
|
||||||
syncprov_findcsn( op, FIND_CSN );
|
syncprov_findcsn( op, FIND_CSN );
|
||||||
op->o_sync_state.ctxcsn = old;
|
srs->sr_state.ctxcsn = old;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Append CSN range to search filter, save original filter
|
/* Append CSN range to search filter, save original filter
|
||||||
|
|
@ -900,7 +907,7 @@ syncprov_op_search( Operation *op, SlapReply *rs )
|
||||||
fava->f_choice = LDAP_FILTER_GE;
|
fava->f_choice = LDAP_FILTER_GE;
|
||||||
fava->f_ava = op->o_tmpalloc( sizeof(AttributeAssertion), op->o_tmpmemctx );
|
fava->f_ava = op->o_tmpalloc( sizeof(AttributeAssertion), op->o_tmpmemctx );
|
||||||
fava->f_ava->aa_desc = slap_schema.si_ad_entryCSN;
|
fava->f_ava->aa_desc = slap_schema.si_ad_entryCSN;
|
||||||
ber_dupbv_x( &fava->f_ava->aa_value, op->o_sync_state.ctxcsn, op->o_tmpmemctx );
|
ber_dupbv_x( &fava->f_ava->aa_value, srs->sr_state.ctxcsn, op->o_tmpmemctx );
|
||||||
}
|
}
|
||||||
fava->f_next = op->ors_filter;
|
fava->f_next = op->ors_filter;
|
||||||
op->ors_filter = fand;
|
op->ors_filter = fand;
|
||||||
|
|
@ -987,6 +994,8 @@ syncprov_db_init(
|
||||||
uuid_anlist[0].an_desc = slap_schema.si_ad_entryUUID;
|
uuid_anlist[0].an_desc = slap_schema.si_ad_entryUUID;
|
||||||
uuid_anlist[0].an_name = slap_schema.si_ad_entryUUID->ad_cname;
|
uuid_anlist[0].an_name = slap_schema.si_ad_entryUUID->ad_cname;
|
||||||
|
|
||||||
|
sync_cid = slap_cids.sc_LDAPsync;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -332,7 +332,6 @@ static int unique_search(
|
||||||
nop->ors_tlimit = SLAP_NO_LIMIT;
|
nop->ors_tlimit = SLAP_NO_LIMIT;
|
||||||
nop->ors_attrs = slap_anlist_no_attrs;
|
nop->ors_attrs = slap_anlist_no_attrs;
|
||||||
nop->ors_attrsonly = 1;
|
nop->ors_attrsonly = 1;
|
||||||
nop->o_sync_slog_size = -1;
|
|
||||||
|
|
||||||
nop->o_req_ndn = ud->dn;
|
nop->o_req_ndn = ud->dn;
|
||||||
nop->o_ndn = op->o_bd->be_rootndn;
|
nop->o_ndn = op->o_bd->be_rootndn;
|
||||||
|
|
|
||||||
|
|
@ -1018,7 +1018,6 @@ exact_match:
|
||||||
op.ors_tlimit = SLAP_NO_LIMIT;
|
op.ors_tlimit = SLAP_NO_LIMIT;
|
||||||
op.ors_attrs = slap_anlist_no_attrs;
|
op.ors_attrs = slap_anlist_no_attrs;
|
||||||
op.ors_attrsonly = 1;
|
op.ors_attrsonly = 1;
|
||||||
op.o_sync_slog_size = -1;
|
|
||||||
|
|
||||||
op.o_bd->be_search( &op, &rs );
|
op.o_bd->be_search( &op, &rs );
|
||||||
|
|
||||||
|
|
@ -1184,7 +1183,6 @@ void slap_sasl2dn( Operation *opx,
|
||||||
op.ors_tlimit = SLAP_NO_LIMIT;
|
op.ors_tlimit = SLAP_NO_LIMIT;
|
||||||
op.ors_attrs = slap_anlist_no_attrs;
|
op.ors_attrs = slap_anlist_no_attrs;
|
||||||
op.ors_attrsonly = 1;
|
op.ors_attrsonly = 1;
|
||||||
op.o_sync_slog_size = -1;
|
|
||||||
/* use req_ndn as req_dn instead of non-pretty base of uri */
|
/* use req_ndn as req_dn instead of non-pretty base of uri */
|
||||||
if( !BER_BVISNULL( &base ) ) {
|
if( !BER_BVISNULL( &base ) ) {
|
||||||
ch_free( base.bv_val );
|
ch_free( base.bv_val );
|
||||||
|
|
|
||||||
|
|
@ -225,9 +225,11 @@ return_results:;
|
||||||
if ( ( op->o_sync_mode & SLAP_SYNC_PERSIST ) ) {
|
if ( ( op->o_sync_mode & SLAP_SYNC_PERSIST ) ) {
|
||||||
return rs->sr_err;
|
return rs->sr_err;
|
||||||
}
|
}
|
||||||
|
#if 0
|
||||||
if ( ( op->o_sync_slog_size != -1 ) ) {
|
if ( ( op->o_sync_slog_size != -1 ) ) {
|
||||||
return rs->sr_err;
|
return rs->sr_err;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
if ( !BER_BVISNULL( &op->o_req_dn ) ) {
|
if ( !BER_BVISNULL( &op->o_req_dn ) ) {
|
||||||
slap_sl_free( op->o_req_dn.bv_val, op->o_tmpmemctx );
|
slap_sl_free( op->o_req_dn.bv_val, op->o_tmpmemctx );
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@
|
||||||
#include "slap.h"
|
#include "slap.h"
|
||||||
#include "lutil_ldap.h"
|
#include "lutil_ldap.h"
|
||||||
|
|
||||||
|
#if 0
|
||||||
int
|
int
|
||||||
slap_send_session_log(
|
slap_send_session_log(
|
||||||
Operation *op,
|
Operation *op,
|
||||||
|
|
@ -131,3 +132,4 @@ slap_add_session_log(
|
||||||
|
|
||||||
return LDAP_SUCCESS;
|
return LDAP_SUCCESS;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -1157,7 +1157,7 @@ typedef struct slap_authz_info {
|
||||||
} AuthorizationInformation;
|
} AuthorizationInformation;
|
||||||
|
|
||||||
|
|
||||||
#ifdef LDAP_DEVEL
|
#if 0 /* LDAP_DEVEL */
|
||||||
#define SLAP_DYNACL
|
#define SLAP_DYNACL
|
||||||
#endif /* LDAP_DEVEL */
|
#endif /* LDAP_DEVEL */
|
||||||
|
|
||||||
|
|
@ -2132,6 +2132,10 @@ struct slap_control_ids {
|
||||||
int sc_LDAPsync;
|
int sc_LDAPsync;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
typedef struct syncrepl_state {
|
||||||
|
struct sync_cookie sr_state;
|
||||||
|
int sr_rhint;
|
||||||
|
} syncrepl_state;
|
||||||
/*
|
/*
|
||||||
* represents an operation pending from an ldap client
|
* represents an operation pending from an ldap client
|
||||||
*/
|
*/
|
||||||
|
|
@ -2303,6 +2307,7 @@ typedef struct slap_op {
|
||||||
#define SLAP_SYNC_REFRESH (LDAP_SYNC_REFRESH_ONLY<<SLAP_CONTROL_SHIFT)
|
#define SLAP_SYNC_REFRESH (LDAP_SYNC_REFRESH_ONLY<<SLAP_CONTROL_SHIFT)
|
||||||
#define SLAP_SYNC_PERSIST (LDAP_SYNC_RESERVED<<SLAP_CONTROL_SHIFT)
|
#define SLAP_SYNC_PERSIST (LDAP_SYNC_RESERVED<<SLAP_CONTROL_SHIFT)
|
||||||
#define SLAP_SYNC_REFRESH_AND_PERSIST (LDAP_SYNC_REFRESH_AND_PERSIST<<SLAP_CONTROL_SHIFT)
|
#define SLAP_SYNC_REFRESH_AND_PERSIST (LDAP_SYNC_REFRESH_AND_PERSIST<<SLAP_CONTROL_SHIFT)
|
||||||
|
#ifdef BDB_PSEARCH
|
||||||
struct sync_cookie o_sync_state;
|
struct sync_cookie o_sync_state;
|
||||||
int o_sync_rhint;
|
int o_sync_rhint;
|
||||||
struct berval o_sync_cid;
|
struct berval o_sync_cid;
|
||||||
|
|
@ -2323,6 +2328,7 @@ typedef struct slap_op {
|
||||||
Avlnode *o_psearch_finished;
|
Avlnode *o_psearch_finished;
|
||||||
struct pc_entry *o_ps_send_wait;
|
struct pc_entry *o_ps_send_wait;
|
||||||
ldap_pvt_thread_mutex_t o_pcmutex;
|
ldap_pvt_thread_mutex_t o_pcmutex;
|
||||||
|
#endif
|
||||||
|
|
||||||
AuthorizationInformation o_authz;
|
AuthorizationInformation o_authz;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -929,13 +929,6 @@ do_syncrepl(
|
||||||
op.o_managedsait = SLAP_CONTROL_NONCRITICAL;
|
op.o_managedsait = SLAP_CONTROL_NONCRITICAL;
|
||||||
op.o_bd = be = si->si_be;
|
op.o_bd = be = si->si_be;
|
||||||
|
|
||||||
op.o_sync_state.ctxcsn = NULL;
|
|
||||||
op.o_sync_state.sid = -1;
|
|
||||||
op.o_sync_state.octet_str = NULL;
|
|
||||||
op.o_sync_slog_size = -1;
|
|
||||||
LDAP_STAILQ_FIRST( &op.o_sync_slog_list ) = NULL;
|
|
||||||
op.o_sync_slog_list.stqh_last = &LDAP_STAILQ_FIRST(&op.o_sync_slog_list);
|
|
||||||
|
|
||||||
/* Establish session, do search */
|
/* Establish session, do search */
|
||||||
if ( !si->si_ld ) {
|
if ( !si->si_ld ) {
|
||||||
first = 1;
|
first = 1;
|
||||||
|
|
@ -1298,6 +1291,7 @@ syncrepl_entry(
|
||||||
if ( rs_search.sr_err == LDAP_SUCCESS &&
|
if ( rs_search.sr_err == LDAP_SUCCESS &&
|
||||||
!BER_BVISNULL( &si->si_syncUUID_ndn ))
|
!BER_BVISNULL( &si->si_syncUUID_ndn ))
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
char *subseq_ptr;
|
char *subseq_ptr;
|
||||||
|
|
||||||
if ( syncstate != LDAP_SYNC_DELETE ) {
|
if ( syncstate != LDAP_SYNC_DELETE ) {
|
||||||
|
|
@ -1310,6 +1304,7 @@ syncrepl_entry(
|
||||||
subseq_ptr += 4;
|
subseq_ptr += 4;
|
||||||
*subseq_ptr = '1';
|
*subseq_ptr = '1';
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
op->o_req_dn = si->si_syncUUID_ndn;
|
op->o_req_dn = si->si_syncUUID_ndn;
|
||||||
op->o_req_ndn = si->si_syncUUID_ndn;
|
op->o_req_ndn = si->si_syncUUID_ndn;
|
||||||
|
|
@ -1350,7 +1345,9 @@ syncrepl_entry(
|
||||||
op->o_req_ndn = org_req_ndn;
|
op->o_req_ndn = org_req_ndn;
|
||||||
op->o_delete_glue_parent = 0;
|
op->o_delete_glue_parent = 0;
|
||||||
|
|
||||||
|
#if 0
|
||||||
op->o_no_psearch = 0;
|
op->o_no_psearch = 0;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
switch ( syncstate ) {
|
switch ( syncstate ) {
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,8 @@ argsfile ./testrun/slapd.1.args
|
||||||
#mod#moduleload back_@BACKEND@.la
|
#mod#moduleload back_@BACKEND@.la
|
||||||
#monitormod#modulepath ../servers/slapd/back-monitor/
|
#monitormod#modulepath ../servers/slapd/back-monitor/
|
||||||
#monitormod#moduleload back_monitor.la
|
#monitormod#moduleload back_monitor.la
|
||||||
|
#syncprovmod#modulepath ../servers/slapd/overlays/
|
||||||
|
#syncprovmod#moduleload syncprov.la
|
||||||
|
|
||||||
#######################################################################
|
#######################################################################
|
||||||
# master database definitions
|
# master database definitions
|
||||||
|
|
@ -42,6 +44,7 @@ rootpw secret
|
||||||
#bdb#index objectClass eq
|
#bdb#index objectClass eq
|
||||||
#bdb#index cn,sn,uid pres,eq,sub
|
#bdb#index cn,sn,uid pres,eq,sub
|
||||||
|
|
||||||
sessionlog 1 100
|
#sessionlog 1 100
|
||||||
|
overlay syncprov
|
||||||
|
|
||||||
#monitor#database monitor
|
#monitor#database monitor
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,7 @@ AC_ppolicy=ppolicy@BUILD_PPOLICY@
|
||||||
AC_refint=refint@BUILD_REFINT@
|
AC_refint=refint@BUILD_REFINT@
|
||||||
AC_unique=unique@BUILD_UNIQUE@
|
AC_unique=unique@BUILD_UNIQUE@
|
||||||
AC_rwm=rwm@BUILD_RWM@
|
AC_rwm=rwm@BUILD_RWM@
|
||||||
|
AC_syncprov=syncprov@BUILD_SYNCPROV@
|
||||||
|
|
||||||
# misc
|
# misc
|
||||||
AC_WITH_SASL=@WITH_SASL@
|
AC_WITH_SASL=@WITH_SASL@
|
||||||
|
|
@ -44,7 +45,7 @@ AC_WITH_TLS=@WITH_TLS@
|
||||||
AC_WITH_MODULES_ENABLED=@WITH_MODULES_ENABLED@
|
AC_WITH_MODULES_ENABLED=@WITH_MODULES_ENABLED@
|
||||||
|
|
||||||
export AC_bdb AC_hdb AC_ldap AC_ldbm AC_monitor AC_relay AC_sql
|
export AC_bdb AC_hdb AC_ldap AC_ldbm AC_monitor AC_relay AC_sql
|
||||||
export AC_pcache AC_ppolicy AC_refint AC_unique AC_rwm
|
export AC_pcache AC_ppolicy AC_refint AC_unique AC_rwm AC_syncprov
|
||||||
export AC_WITH_SASL AC_WITH_TLS AC_WITH_MODULES_ENABLED
|
export AC_WITH_SASL AC_WITH_TLS AC_WITH_MODULES_ENABLED
|
||||||
|
|
||||||
if test ! -x ../servers/slapd/slapd ; then
|
if test ! -x ../servers/slapd/slapd ; then
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@ PPOLICY=${AC_ppolicy-ppolicyno}
|
||||||
REFINT=${AC_refint-refintno}
|
REFINT=${AC_refint-refintno}
|
||||||
RWM=${AC_rwm-rwmno}
|
RWM=${AC_rwm-rwmno}
|
||||||
UNIQUE=${AC_unique-uniqueno}
|
UNIQUE=${AC_unique-uniqueno}
|
||||||
|
SYNCPROV=${AC_syncprov-syncprovno}
|
||||||
WITH_SASL=${AC_WITH_SASL-no}
|
WITH_SASL=${AC_WITH_SASL-no}
|
||||||
USE_SASL=${SLAPD_USE_SASL-no}
|
USE_SASL=${SLAPD_USE_SASL-no}
|
||||||
WITHTLS=${AC_WITHTLS-yes}
|
WITHTLS=${AC_WITHTLS-yes}
|
||||||
|
|
|
||||||
|
|
@ -13,14 +13,14 @@
|
||||||
## top-level directory of the distribution or, alternatively, at
|
## top-level directory of the distribution or, alternatively, at
|
||||||
## <http://www.OpenLDAP.org/license.html>.
|
## <http://www.OpenLDAP.org/license.html>.
|
||||||
|
|
||||||
if test "$BACKEND" != "bdb" -a "$BACKEND" != "hdb" ; then
|
|
||||||
echo "Test does not support $BACKEND"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "running defines.sh"
|
echo "running defines.sh"
|
||||||
. $SRCDIR/scripts/defines.sh
|
. $SRCDIR/scripts/defines.sh
|
||||||
|
|
||||||
|
if test $SYNCPROV = syncprovno; then
|
||||||
|
echo "Syncrepl provider overlay not available, test skipped"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
mkdir -p $TESTDIR $DBDIR1 $DBDIR2 $DBDIR3
|
mkdir -p $TESTDIR $DBDIR1 $DBDIR2 $DBDIR3
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,11 @@ fi
|
||||||
echo "running defines.sh"
|
echo "running defines.sh"
|
||||||
. $SRCDIR/scripts/defines.sh
|
. $SRCDIR/scripts/defines.sh
|
||||||
|
|
||||||
|
if test $SYNCPROV = syncprovno; then
|
||||||
|
echo "Syncrepl provider overlay not available, test skipped"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
mkdir -p $TESTDIR $DBDIR1 $DBDIR4
|
mkdir -p $TESTDIR $DBDIR1 $DBDIR4
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,11 @@ fi
|
||||||
echo "running defines.sh"
|
echo "running defines.sh"
|
||||||
. $SRCDIR/scripts/defines.sh
|
. $SRCDIR/scripts/defines.sh
|
||||||
|
|
||||||
|
if test $SYNCPROV = syncprovno; then
|
||||||
|
echo "Syncrepl provider overlay not available, test skipped"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
mkdir $TESTDIR $DBDIR1 $DBDIR2 $DBDIR3 $DBDIR4 $DBDIR5 $DBDIR6
|
mkdir $TESTDIR $DBDIR1 $DBDIR2 $DBDIR3 $DBDIR4 $DBDIR5 $DBDIR6
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue