From: Kurt Zeilenga Date: Wed, 20 Jan 1999 02:07:13 +0000 (+0000) Subject: Move aliasing dereferencing code behind #ifdef SLAPD_ALIAS_DEREF. X-Git-Tag: OPENLDAP_REL_ENG_1_1_3~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1ae6755b77ad63574ea37cbc38b64bc3d1a8ef14;p=thirdparty%2Fopenldap.git Move aliasing dereferencing code behind #ifdef SLAPD_ALIAS_DEREF. This change will be backed out of devel once imported into release engineering branchs. --- diff --git a/servers/slapd/back-ldbm/alias.c b/servers/slapd/back-ldbm/alias.c index 75cd074db2..621f8c3527 100644 --- a/servers/slapd/back-ldbm/alias.c +++ b/servers/slapd/back-ldbm/alias.c @@ -12,6 +12,8 @@ #include "portable.h" +#ifndef SLAPD_ALIAS_DEREF + #include #include #include /* Get struct sockaddr for slap.h */ @@ -243,3 +245,5 @@ char *derefDN ( Backend *be, return newDN; } + +#endif SLAPD_ALIAS_DEREF diff --git a/servers/slapd/back-ldbm/proto-back-ldbm.h b/servers/slapd/back-ldbm/proto-back-ldbm.h index b51691eb4c..c70d20a1c0 100644 --- a/servers/slapd/back-ldbm/proto-back-ldbm.h +++ b/servers/slapd/back-ldbm/proto-back-ldbm.h @@ -8,6 +8,7 @@ LDAP_BEGIN_DECL /* * alias.c */ +#ifdef SLAPD_ALIAS_DEREF Entry *derefAlias_r LDAP_P(( Backend *be, Connection *conn, @@ -18,6 +19,7 @@ char *derefDN LDAP_P(( Connection *conn, Operation *op, char *dn )); +#endif /* * attr.c diff --git a/servers/slapd/back-ldbm/search.c b/servers/slapd/back-ldbm/search.c index 15c0d3f6a7..abf63a967a 100644 --- a/servers/slapd/back-ldbm/search.c +++ b/servers/slapd/back-ldbm/search.c @@ -76,6 +76,7 @@ ldbm_back_search( * the subordinates of the base */ +#ifdef SLAPD_DEREF switch ( deref ) { case LDAP_DEREF_FINDING: case LDAP_DEREF_ALWAYS: @@ -84,6 +85,9 @@ ldbm_back_search( default: realBase = ch_strdup(base); } +#else + realBase = ch_strdup(base); +#endif (void) dn_normalize (realBase); @@ -244,6 +248,7 @@ ldbm_back_search( return( 0 ); } +#ifdef SLAPD_DEREF /* * check and apply aliasing where the dereferencing applies to * the subordinates of the base @@ -258,6 +263,7 @@ ldbm_back_search( } break; } +#endif switch ( send_search_entry( be, conn, op, e, attrs, attrsonly ) ) {