Commit 1ae6755b authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Move aliasing dereferencing code behind #ifdef SLAPD_ALIAS_DEREF.

This change will be backed out of devel once imported into release engineering
branchs.
parent 61c3252e
......@@ -12,6 +12,8 @@
#include "portable.h"
#ifndef SLAPD_ALIAS_DEREF
#include <stdio.h>
#include <string.h>
#include <ac/socket.h> /* Get struct sockaddr for slap.h */
......@@ -243,3 +245,5 @@ char *derefDN ( Backend *be,
return newDN;
}
#endif SLAPD_ALIAS_DEREF
......@@ -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
......
......@@ -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 ) ) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment