mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
Various udpates for SyncRepl
This commit is contained in:
parent
b3e62ef604
commit
aaa66d254e
@ -312,10 +312,13 @@ retry: /* transaction retry */
|
||||
#endif
|
||||
rs->sr_err = LDAP_INSUFFICIENT_ACCESS;
|
||||
rs->sr_text = "no write access to parent";
|
||||
goto return_results;;
|
||||
goto return_results;
|
||||
}
|
||||
|
||||
#ifdef LDAP_SYNCREPL
|
||||
} else if ( !is_entry_glue( op->oq_add.rs_e )) {
|
||||
#else
|
||||
} else {
|
||||
#endif
|
||||
#ifdef NEW_LOGGING
|
||||
LDAP_LOG ( OPERATION, DETAIL1, "bdb_add: %s denied\n",
|
||||
pdn.bv_len == 0 ? "suffix" : "entry at root", 0, 0 );
|
||||
@ -324,7 +327,7 @@ retry: /* transaction retry */
|
||||
pdn.bv_len == 0 ? "suffix" : "entry at root",
|
||||
0, 0 );
|
||||
#endif
|
||||
rs->sr_err = LDAP_INSUFFICIENT_ACCESS;
|
||||
rs->sr_err = LDAP_NO_SUCH_OBJECT;
|
||||
goto return_results;
|
||||
}
|
||||
}
|
||||
@ -339,9 +342,9 @@ retry: /* transaction retry */
|
||||
"bdb_add: no parent, cannot add subentry\n",
|
||||
0, 0, 0 );
|
||||
#endif
|
||||
rs->sr_err = LDAP_INSUFFICIENT_ACCESS;
|
||||
rs->sr_err = LDAP_NO_SUCH_OBJECT;
|
||||
rs->sr_text = "no parent, cannot add subentry";
|
||||
goto return_results;;
|
||||
goto return_results;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -226,7 +226,7 @@ retry: /* transaction retry */
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef LDAP_SYNCREPL
|
||||
#ifdef LDAP_SYNCREPL /* FIXME : dn2entry() should return non-glue entry */
|
||||
if ( e == NULL || ( !manageDSAit && is_entry_glue( e ))) {
|
||||
#else
|
||||
if ( e == NULL ) {
|
||||
@ -240,11 +240,7 @@ retry: /* transaction retry */
|
||||
op->o_req_dn.bv_val, 0, 0);
|
||||
#endif
|
||||
|
||||
#ifdef LDAP_SYNCREPL
|
||||
if ( e == NULL && matched != NULL && !is_entry_glue( matched )) {
|
||||
#else
|
||||
if ( matched != NULL ) {
|
||||
#endif
|
||||
rs->sr_matched = ch_strdup( matched->e_dn );
|
||||
rs->sr_ref = is_entry_referral( matched )
|
||||
? get_entry_referrals( op, matched )
|
||||
|
@ -12,7 +12,6 @@
|
||||
|
||||
#include "back-bdb.h"
|
||||
|
||||
|
||||
/*
|
||||
* dn2entry - look up dn in the cache/indexes and return the corresponding
|
||||
* entry. If the requested DN is not found and matched is TRUE, return info
|
||||
|
@ -411,14 +411,12 @@ retry: /* transaction retry */
|
||||
|
||||
e = ei->bei_e;
|
||||
/* acquire and lock entry */
|
||||
#ifdef LDAP_SYNCREPL
|
||||
if ( rs->sr_err == DB_NOTFOUND || !e ||
|
||||
( !manageDSAit && is_entry_glue( e ))) {
|
||||
if ( e != NULL && !is_entry_glue( e )) {
|
||||
#ifdef LDAP_SYNCREPL /* FIXME: dn2entry() should return non-glue entry */
|
||||
if (( rs->sr_err == DB_NOTFOUND ) || ( !manageDSAit && e && is_entry_glue( e ))) {
|
||||
#else
|
||||
if ( rs->sr_err == DB_NOTFOUND ) {
|
||||
if ( e != NULL ) {
|
||||
#endif
|
||||
if ( e != NULL ) {
|
||||
rs->sr_matched = ch_strdup( e->e_dn );
|
||||
rs->sr_ref = is_entry_referral( e )
|
||||
? get_entry_referrals( op, e )
|
||||
|
@ -160,14 +160,12 @@ retry: /* transaction retry */
|
||||
}
|
||||
|
||||
e = ei->bei_e;
|
||||
#ifdef LDAP_SYNCREPL
|
||||
if ( rs->sr_err == DB_NOTFOUND || !e ||
|
||||
( !manageDSAit && is_entry_glue( e ))) {
|
||||
if( e != NULL && !is_entry_glue( e )) {
|
||||
#ifdef LDAP_SYNCREPL /* FIXME: dn2entry() should return non-glue entry */
|
||||
if (( rs->sr_err == DB_NOTFOUND ) || ( !manageDSAit && e && is_entry_glue( e ))) {
|
||||
#else
|
||||
if ( rs->sr_err == DB_NOTFOUND ) {
|
||||
if( e != NULL ) {
|
||||
#endif
|
||||
if( e != NULL ) {
|
||||
rs->sr_matched = ch_strdup( e->e_dn );
|
||||
rs->sr_ref = is_entry_referral( e )
|
||||
? get_entry_referrals( op, e )
|
||||
@ -687,6 +685,7 @@ retry: /* transaction retry */
|
||||
new_ndn.bv_val, 0, 0 );
|
||||
#endif
|
||||
|
||||
|
||||
/* Shortcut the search */
|
||||
nei = neip ? neip : eip;
|
||||
rs->sr_err = bdb_cache_find_ndn ( op, ltid, &new_ndn, &nei, locker );
|
||||
|
@ -175,6 +175,7 @@ retry: /* transaction retry */
|
||||
|
||||
#ifdef LDAP_SYNCREPL
|
||||
if ( e == NULL || is_entry_glue( e )) {
|
||||
/* FIXME: dn2entry() should return non-glue entry */
|
||||
#else
|
||||
if ( e == NULL ) {
|
||||
#endif
|
||||
@ -191,6 +192,7 @@ retry: /* transaction retry */
|
||||
goto done;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef BDB_ALIASES
|
||||
if( is_entry_alias( e ) ) {
|
||||
/* entry is an alias, don't allow operation */
|
||||
|
@ -887,7 +887,9 @@ id2entry_retry:
|
||||
|
||||
rs->sr_entry = e;
|
||||
#ifdef BDB_SUBENTRIES
|
||||
/* FIXME: send all but syncrepl
|
||||
if ( !is_sync_protocol( sop ) ) {
|
||||
*/
|
||||
if ( is_entry_subentry( e ) ) {
|
||||
if( sop->oq_search.rs_scope != LDAP_SCOPE_BASE ) {
|
||||
if(!get_subentries_visibility( sop )) {
|
||||
@ -906,7 +908,9 @@ id2entry_retry:
|
||||
/* only subentries are visible */
|
||||
goto loop_continue;
|
||||
}
|
||||
/*
|
||||
}
|
||||
*/
|
||||
#endif
|
||||
|
||||
/* Does this candidate actually satisfy the search scope?
|
||||
@ -1017,8 +1021,7 @@ id2entry_retry:
|
||||
}
|
||||
|
||||
#ifdef LDAP_SYNCREPL
|
||||
if ( !manageDSAit && is_entry_glue( e ) )
|
||||
{
|
||||
if ( !manageDSAit && is_entry_glue( e )) {
|
||||
goto loop_continue;
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user