mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-30 13:30:57 +08:00
unifdef -DBDB_ALIASES
delete dead code
This commit is contained in:
parent
1d35c8f8ec
commit
b29e311ae7
@ -208,7 +208,6 @@ retry: /* transaction retry */
|
||||
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",
|
||||
@ -217,7 +216,6 @@ retry: /* transaction retry */
|
||||
rs->sr_text = "parent is an alias";
|
||||
goto return_results;;
|
||||
}
|
||||
#endif
|
||||
|
||||
if ( is_entry_referral( p ) ) {
|
||||
/* parent is a referral, don't allow add */
|
||||
|
@ -41,8 +41,6 @@ LDAP_BEGIN_DECL
|
||||
|
||||
#define BDB_MAX_ADD_LOOP 30
|
||||
|
||||
#define BDB_ALIASES 1
|
||||
|
||||
#ifdef BDB_SUBDIRS
|
||||
#define BDB_TMP_SUBDIR "tmp"
|
||||
#define BDB_LG_SUBDIR "log"
|
||||
|
@ -114,20 +114,12 @@ dn2entry_retry:
|
||||
}
|
||||
#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,
|
||||
@ -141,20 +133,12 @@ dn2entry_retry:
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -67,9 +67,6 @@ bdb_filter_candidates(
|
||||
{
|
||||
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:
|
||||
@ -91,27 +88,6 @@ bdb_filter_candidates(
|
||||
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 );
|
||||
|
@ -313,7 +313,6 @@ dn2entry_retry:
|
||||
"=> 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,
|
||||
@ -321,7 +320,6 @@ dn2entry_retry:
|
||||
rc = LDAP_ALIAS_PROBLEM;
|
||||
goto return_results;
|
||||
}
|
||||
#endif
|
||||
|
||||
if( is_entry_referral( e ) ) {
|
||||
Debug( LDAP_DEBUG_ACL,
|
||||
|
@ -572,9 +572,7 @@ bdb_initialize(
|
||||
#ifdef BDB_SUBENTRIES
|
||||
SLAP_BFLAG_SUBENTRIES |
|
||||
#endif
|
||||
#ifdef BDB_ALIASES
|
||||
SLAP_BFLAG_ALIASES |
|
||||
#endif
|
||||
SLAP_BFLAG_REFERRALS;
|
||||
|
||||
bi->bi_controls = controls;
|
||||
|
@ -474,7 +474,6 @@ retry: /* transaction retry */
|
||||
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",
|
||||
@ -483,7 +482,6 @@ retry: /* transaction retry */
|
||||
rs->sr_err = LDAP_ALIAS_PROBLEM;
|
||||
goto return_results;
|
||||
}
|
||||
#endif
|
||||
|
||||
if ( is_entry_referral( np ) ) {
|
||||
/* parent is a referral, don't allow add */
|
||||
|
@ -1294,7 +1294,6 @@ id2entry_retry:
|
||||
} 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
|
||||
@ -1326,7 +1325,6 @@ id2entry_retry:
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Not in scope, ignore it */
|
||||
if ( !IS_POST_SEARCH && !scopeok ) {
|
||||
@ -2022,14 +2020,8 @@ parse_paged_cookie( Operation *op, SlapReply *rs )
|
||||
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 {
|
||||
@ -2047,25 +2039,9 @@ parse_paged_cookie( Operation *op, SlapReply *rs )
|
||||
|
||||
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 ) {
|
||||
|
Loading…
Reference in New Issue
Block a user