#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 );
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;
}
}
"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
}
}
}
-#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 ) {
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 )
#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
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 )
}
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 )
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 );
#ifdef LDAP_SYNCREPL
if ( e == NULL || is_entry_glue( e )) {
+ /* FIXME: dn2entry() should return non-glue entry */
#else
if ( e == NULL ) {
#endif
goto done;
}
#endif
+
#ifdef BDB_ALIASES
if( is_entry_alias( e ) ) {
/* entry is an alias, don't allow operation */
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 )) {
/* only subentries are visible */
goto loop_continue;
}
+ /*
}
+ */
#endif
/* Does this candidate actually satisfy the search scope?
}
#ifdef LDAP_SYNCREPL
- if ( !manageDSAit && is_entry_glue( e ) )
- {
+ if ( !manageDSAit && is_entry_glue( e )) {
goto loop_continue;
}
#endif