goto return_results;;
}
#endif
-#ifdef BDB_ALIASES
if ( is_entry_alias( p ) ) {
/* parent is an alias, don't allow add */
Debug( LDAP_DEBUG_TRACE, "bdb_add: parent is alias\n",
rs->sr_text = "parent is an alias";
goto return_results;;
}
-#endif
if ( is_entry_referral( p ) ) {
/* parent is a referral, don't allow add */
#define BDB_MAX_ADD_LOOP 30
-#define BDB_ALIASES 1
-
#ifdef BDB_SUBDIRS
#define BDB_TMP_SUBDIR "tmp"
#define BDB_LG_SUBDIR "log"
}
#endif
-#ifdef BDB_ALIASES
if ( is_entry_alias( e ) ) {
/* entry is an alias, don't allow bind */
Debug( LDAP_DEBUG_TRACE, "entry is alias\n", 0, 0, 0 );
-
-#if 1
rs->sr_err = LDAP_INVALID_CREDENTIALS;
-#else
- rs->sr_err = LDAP_ALIAS_PROBLEM;
- rs->sr_text = "entry is alias";
-#endif
goto done;
}
-#endif
if ( is_entry_referral( e ) ) {
Debug( LDAP_DEBUG_TRACE, "entry is referral\n", 0,
rs->sr_err = access_allowed( op, e,
password, NULL, ACL_AUTH, NULL );
if ( ! rs->sr_err ) {
-#if 1
rs->sr_err = LDAP_INVALID_CREDENTIALS;
-#else
- rs->sr_err = LDAP_INSUFFICIENT_ACCESS;
-#endif
goto done;
}
if ( (a = attr_find( e->e_attrs, password )) == NULL ) {
-#if 1
rs->sr_err = LDAP_INVALID_CREDENTIALS;
-#else
- rs->sr_err = LDAP_INAPPROPRIATE_AUTH;
-#endif
goto done;
}
{
int rc = 0;
Debug( LDAP_DEBUG_FILTER, "=> bdb_filter_candidates\n", 0, 0, 0 );
-#if 0
- char *subtree="SUBTREE";
-#endif
switch ( f->f_choice ) {
case SLAPD_FILTER_COMPUTED:
break;
}
break;
-#if 0 /* Not used any more, search calls bdb_dn2idl directly */
- case SLAPD_FILTER_DN_ONE:
- Debug( LDAP_DEBUG_FILTER, "\tDN ONE\n", 0, 0, 0 );
- rc = bdb_dn2idl( op->o_bd, f->f_dn, DN_ONE_PREFIX, ids,
- stack, op->o_tmpmemctx );
- if( rc == DB_NOTFOUND ) {
- BDB_IDL_ZERO( ids );
- rc = 0;
- }
- break;
-
- case SLAPD_FILTER_DN_CHILDREN:
- subtree="CHILDREN";
- /* Fall Thru */
- case SLAPD_FILTER_DN_SUBTREE:
- Debug( LDAP_DEBUG_FILTER, "\tDN %s\n",
- subtree, 0, 0 );
- rc = bdb_dn2idl( op->o_bd, f->f_dn, DN_SUBTREE_PREFIX, ids,
- stack, op->o_tmpmemctx );
- break;
-#endif
case LDAP_FILTER_PRESENT:
Debug( LDAP_DEBUG_FILTER, "\tPRESENT\n", 0, 0, 0 );
rc = presence_candidates( op, f->f_desc, ids );
"=> bdb_entry_get: found entry: \"%s\"\n",
ndn->bv_val, 0, 0 );
-#ifdef BDB_ALIASES
/* find attribute values */
if( is_entry_alias( e ) ) {
Debug( LDAP_DEBUG_ACL,
rc = LDAP_ALIAS_PROBLEM;
goto return_results;
}
-#endif
if( is_entry_referral( e ) ) {
Debug( LDAP_DEBUG_ACL,
#ifdef BDB_SUBENTRIES
SLAP_BFLAG_SUBENTRIES |
#endif
-#ifdef BDB_ALIASES
SLAP_BFLAG_ALIASES |
-#endif
SLAP_BFLAG_REFERRALS;
bi->bi_controls = controls;
goto return_results;
}
-#ifdef BDB_ALIASES
if ( is_entry_alias( np ) ) {
/* parent is an alias, don't allow add */
Debug( LDAP_DEBUG_TRACE, "bdb_modrdn: entry is alias\n",
rs->sr_err = LDAP_ALIAS_PROBLEM;
goto return_results;
}
-#endif
if ( is_entry_referral( np ) ) {
/* parent is a referral, don't allow add */
} break;
}
-#ifdef BDB_ALIASES
/* aliases were already dereferenced in candidate list */
if ( sop->ors_deref & LDAP_DEREF_SEARCHING ) {
/* but if the search base is an alias, and we didn't
}
}
}
-#endif
/* Not in scope, ignore it */
if ( !IS_POST_SEARCH && !scopeok ) {
return LDAP_PROTOCOL_ERROR;
}
- /* Already tested by frontend */
+ /* Tested by frontend */
assert( c[0]->ldctl_value.bv_len > 0 );
-#if 0
- if ( c[0]->ldctl_value.bv_len == 0 ) {
- rs->sr_text = "paged results control value is empty (or absent)";
- return LDAP_PROTOCOL_ERROR;
- }
-#endif
/* Parse the control value
* realSearchControlValue ::= SEQUENCE {
tag = ber_scanf( ber, "{im}", &size, &cookie );
- /* Already tested by frontend */
+ /* Tested by frontend */
assert( tag != LBER_ERROR );
-#if 0
- if ( tag == LBER_ERROR ) {
- rs->sr_text = "paged results control could not be decoded";
- rc = LDAP_PROTOCOL_ERROR;
- goto done;
- }
-#endif
-
- /* Already tested by frontend */
assert( size >= 0 );
-#if 0
- if ( size < 0 ) {
- rs->sr_text = "paged results control size invalid";
- rc = LDAP_PROTOCOL_ERROR;
- goto done;
- }
-#endif
/* cookie decoding/checks deferred to backend... */
if ( cookie.bv_len ) {