]> git.sur5r.net Git - openldap/commitdiff
unifdef -DBDB_ALIASES
authorKurt Zeilenga <kurt@openldap.org>
Fri, 5 Nov 2004 07:48:15 +0000 (07:48 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Fri, 5 Nov 2004 07:48:15 +0000 (07:48 +0000)
delete dead code

servers/slapd/back-bdb/add.c
servers/slapd/back-bdb/back-bdb.h
servers/slapd/back-bdb/bind.c
servers/slapd/back-bdb/filterindex.c
servers/slapd/back-bdb/id2entry.c
servers/slapd/back-bdb/init.c
servers/slapd/back-bdb/modrdn.c
servers/slapd/back-bdb/search.c

index 651281ece899eedc8cfbfd4c8d921c126cdc581e..07b8265283f9d5c50b15fd41bcf8813eac4600a3 100644 (file)
@@ -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 */
index a95b084f11d76cb724c1e0924365d01fccb2d77a..40227ccd9e9a4b0c8b93b873d4e02c4a4538aac1 100644 (file)
@@ -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"
index 5b1df1b9ce410fd6b05912b1accfb778fbb386c7..c4a2092e0a9ec28b0461411c6357f1c76793e61e 100644 (file)
@@ -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;
                }
 
index 573f5890a28c01f1d9bfe060a23470ed9f097b09..62cd9b7f18bf60dbbdd96245ea9cf6b0c0fa6352 100644 (file)
@@ -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 );
index c27f631089ca62d4c4dd283ce42c5684d2811e90..cdef3f488d92abfb9aff2c7b9c280f2f027c0d5b 100644 (file)
@@ -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,
index cc3118f6030d7544b9856e854db0486677b067f2..217c662cf6cb7de62e0b912a692e05b63fbd8df8 100644 (file)
@@ -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;
index 014ad8a9b75c4b869db68d641560c8388c60816f..042311b00f2a8bd82cae33c6cd535e1b5f2f3074 100644 (file)
@@ -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 */
index ca54be4af5c665b662af9d14bd0636dd207663f5..ad1ac12d7fd5ad42a8cd79f6864bce80e1686d51 100644 (file)
@@ -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 ) {