mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-22 23:59:34 -05:00
unifdef -DBDB_ALIASES
delete dead code
This commit is contained in:
parent
1d35c8f8ec
commit
b29e311ae7
8 changed files with 2 additions and 76 deletions
|
|
@ -208,7 +208,6 @@ retry: /* transaction retry */
|
||||||
goto return_results;;
|
goto return_results;;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef BDB_ALIASES
|
|
||||||
if ( is_entry_alias( p ) ) {
|
if ( is_entry_alias( p ) ) {
|
||||||
/* parent is an alias, don't allow add */
|
/* parent is an alias, don't allow add */
|
||||||
Debug( LDAP_DEBUG_TRACE, "bdb_add: parent is alias\n",
|
Debug( LDAP_DEBUG_TRACE, "bdb_add: parent is alias\n",
|
||||||
|
|
@ -217,7 +216,6 @@ retry: /* transaction retry */
|
||||||
rs->sr_text = "parent is an alias";
|
rs->sr_text = "parent is an alias";
|
||||||
goto return_results;;
|
goto return_results;;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if ( is_entry_referral( p ) ) {
|
if ( is_entry_referral( p ) ) {
|
||||||
/* parent is a referral, don't allow add */
|
/* parent is a referral, don't allow add */
|
||||||
|
|
|
||||||
|
|
@ -41,8 +41,6 @@ LDAP_BEGIN_DECL
|
||||||
|
|
||||||
#define BDB_MAX_ADD_LOOP 30
|
#define BDB_MAX_ADD_LOOP 30
|
||||||
|
|
||||||
#define BDB_ALIASES 1
|
|
||||||
|
|
||||||
#ifdef BDB_SUBDIRS
|
#ifdef BDB_SUBDIRS
|
||||||
#define BDB_TMP_SUBDIR "tmp"
|
#define BDB_TMP_SUBDIR "tmp"
|
||||||
#define BDB_LG_SUBDIR "log"
|
#define BDB_LG_SUBDIR "log"
|
||||||
|
|
|
||||||
|
|
@ -114,20 +114,12 @@ dn2entry_retry:
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef BDB_ALIASES
|
|
||||||
if ( is_entry_alias( e ) ) {
|
if ( is_entry_alias( e ) ) {
|
||||||
/* entry is an alias, don't allow bind */
|
/* entry is an alias, don't allow bind */
|
||||||
Debug( LDAP_DEBUG_TRACE, "entry is alias\n", 0, 0, 0 );
|
Debug( LDAP_DEBUG_TRACE, "entry is alias\n", 0, 0, 0 );
|
||||||
|
|
||||||
#if 1
|
|
||||||
rs->sr_err = LDAP_INVALID_CREDENTIALS;
|
rs->sr_err = LDAP_INVALID_CREDENTIALS;
|
||||||
#else
|
|
||||||
rs->sr_err = LDAP_ALIAS_PROBLEM;
|
|
||||||
rs->sr_text = "entry is alias";
|
|
||||||
#endif
|
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if ( is_entry_referral( e ) ) {
|
if ( is_entry_referral( e ) ) {
|
||||||
Debug( LDAP_DEBUG_TRACE, "entry is referral\n", 0,
|
Debug( LDAP_DEBUG_TRACE, "entry is referral\n", 0,
|
||||||
|
|
@ -141,20 +133,12 @@ dn2entry_retry:
|
||||||
rs->sr_err = access_allowed( op, e,
|
rs->sr_err = access_allowed( op, e,
|
||||||
password, NULL, ACL_AUTH, NULL );
|
password, NULL, ACL_AUTH, NULL );
|
||||||
if ( ! rs->sr_err ) {
|
if ( ! rs->sr_err ) {
|
||||||
#if 1
|
|
||||||
rs->sr_err = LDAP_INVALID_CREDENTIALS;
|
rs->sr_err = LDAP_INVALID_CREDENTIALS;
|
||||||
#else
|
|
||||||
rs->sr_err = LDAP_INSUFFICIENT_ACCESS;
|
|
||||||
#endif
|
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( (a = attr_find( e->e_attrs, password )) == NULL ) {
|
if ( (a = attr_find( e->e_attrs, password )) == NULL ) {
|
||||||
#if 1
|
|
||||||
rs->sr_err = LDAP_INVALID_CREDENTIALS;
|
rs->sr_err = LDAP_INVALID_CREDENTIALS;
|
||||||
#else
|
|
||||||
rs->sr_err = LDAP_INAPPROPRIATE_AUTH;
|
|
||||||
#endif
|
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -67,9 +67,6 @@ bdb_filter_candidates(
|
||||||
{
|
{
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
Debug( LDAP_DEBUG_FILTER, "=> bdb_filter_candidates\n", 0, 0, 0 );
|
Debug( LDAP_DEBUG_FILTER, "=> bdb_filter_candidates\n", 0, 0, 0 );
|
||||||
#if 0
|
|
||||||
char *subtree="SUBTREE";
|
|
||||||
#endif
|
|
||||||
|
|
||||||
switch ( f->f_choice ) {
|
switch ( f->f_choice ) {
|
||||||
case SLAPD_FILTER_COMPUTED:
|
case SLAPD_FILTER_COMPUTED:
|
||||||
|
|
@ -91,27 +88,6 @@ bdb_filter_candidates(
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
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:
|
case LDAP_FILTER_PRESENT:
|
||||||
Debug( LDAP_DEBUG_FILTER, "\tPRESENT\n", 0, 0, 0 );
|
Debug( LDAP_DEBUG_FILTER, "\tPRESENT\n", 0, 0, 0 );
|
||||||
rc = presence_candidates( op, f->f_desc, ids );
|
rc = presence_candidates( op, f->f_desc, ids );
|
||||||
|
|
|
||||||
|
|
@ -313,7 +313,6 @@ dn2entry_retry:
|
||||||
"=> bdb_entry_get: found entry: \"%s\"\n",
|
"=> bdb_entry_get: found entry: \"%s\"\n",
|
||||||
ndn->bv_val, 0, 0 );
|
ndn->bv_val, 0, 0 );
|
||||||
|
|
||||||
#ifdef BDB_ALIASES
|
|
||||||
/* find attribute values */
|
/* find attribute values */
|
||||||
if( is_entry_alias( e ) ) {
|
if( is_entry_alias( e ) ) {
|
||||||
Debug( LDAP_DEBUG_ACL,
|
Debug( LDAP_DEBUG_ACL,
|
||||||
|
|
@ -321,7 +320,6 @@ dn2entry_retry:
|
||||||
rc = LDAP_ALIAS_PROBLEM;
|
rc = LDAP_ALIAS_PROBLEM;
|
||||||
goto return_results;
|
goto return_results;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if( is_entry_referral( e ) ) {
|
if( is_entry_referral( e ) ) {
|
||||||
Debug( LDAP_DEBUG_ACL,
|
Debug( LDAP_DEBUG_ACL,
|
||||||
|
|
|
||||||
|
|
@ -572,9 +572,7 @@ bdb_initialize(
|
||||||
#ifdef BDB_SUBENTRIES
|
#ifdef BDB_SUBENTRIES
|
||||||
SLAP_BFLAG_SUBENTRIES |
|
SLAP_BFLAG_SUBENTRIES |
|
||||||
#endif
|
#endif
|
||||||
#ifdef BDB_ALIASES
|
|
||||||
SLAP_BFLAG_ALIASES |
|
SLAP_BFLAG_ALIASES |
|
||||||
#endif
|
|
||||||
SLAP_BFLAG_REFERRALS;
|
SLAP_BFLAG_REFERRALS;
|
||||||
|
|
||||||
bi->bi_controls = controls;
|
bi->bi_controls = controls;
|
||||||
|
|
|
||||||
|
|
@ -474,7 +474,6 @@ retry: /* transaction retry */
|
||||||
goto return_results;
|
goto return_results;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef BDB_ALIASES
|
|
||||||
if ( is_entry_alias( np ) ) {
|
if ( is_entry_alias( np ) ) {
|
||||||
/* parent is an alias, don't allow add */
|
/* parent is an alias, don't allow add */
|
||||||
Debug( LDAP_DEBUG_TRACE, "bdb_modrdn: entry is alias\n",
|
Debug( LDAP_DEBUG_TRACE, "bdb_modrdn: entry is alias\n",
|
||||||
|
|
@ -483,7 +482,6 @@ retry: /* transaction retry */
|
||||||
rs->sr_err = LDAP_ALIAS_PROBLEM;
|
rs->sr_err = LDAP_ALIAS_PROBLEM;
|
||||||
goto return_results;
|
goto return_results;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if ( is_entry_referral( np ) ) {
|
if ( is_entry_referral( np ) ) {
|
||||||
/* parent is a referral, don't allow add */
|
/* parent is a referral, don't allow add */
|
||||||
|
|
|
||||||
|
|
@ -1294,7 +1294,6 @@ id2entry_retry:
|
||||||
} break;
|
} break;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef BDB_ALIASES
|
|
||||||
/* aliases were already dereferenced in candidate list */
|
/* aliases were already dereferenced in candidate list */
|
||||||
if ( sop->ors_deref & LDAP_DEREF_SEARCHING ) {
|
if ( sop->ors_deref & LDAP_DEREF_SEARCHING ) {
|
||||||
/* but if the search base is an alias, and we didn't
|
/* but if the search base is an alias, and we didn't
|
||||||
|
|
@ -1326,7 +1325,6 @@ id2entry_retry:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Not in scope, ignore it */
|
/* Not in scope, ignore it */
|
||||||
if ( !IS_POST_SEARCH && !scopeok ) {
|
if ( !IS_POST_SEARCH && !scopeok ) {
|
||||||
|
|
@ -2022,14 +2020,8 @@ parse_paged_cookie( Operation *op, SlapReply *rs )
|
||||||
return LDAP_PROTOCOL_ERROR;
|
return LDAP_PROTOCOL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Already tested by frontend */
|
/* Tested by frontend */
|
||||||
assert( c[0]->ldctl_value.bv_len > 0 );
|
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
|
/* Parse the control value
|
||||||
* realSearchControlValue ::= SEQUENCE {
|
* realSearchControlValue ::= SEQUENCE {
|
||||||
|
|
@ -2047,25 +2039,9 @@ parse_paged_cookie( Operation *op, SlapReply *rs )
|
||||||
|
|
||||||
tag = ber_scanf( ber, "{im}", &size, &cookie );
|
tag = ber_scanf( ber, "{im}", &size, &cookie );
|
||||||
|
|
||||||
/* Already tested by frontend */
|
/* Tested by frontend */
|
||||||
assert( tag != LBER_ERROR );
|
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 );
|
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... */
|
/* cookie decoding/checks deferred to backend... */
|
||||||
if ( cookie.bv_len ) {
|
if ( cookie.bv_len ) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue