/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 2003-2008 The OpenLDAP Foundation.
+ * Copyright 2003-2009 The OpenLDAP Foundation.
* Portions Copyright 2003 Howard Chu.
* All rights reserved.
*
LDAP_CH_RES,
LDAP_CH_ERR
} ldap_chain_status_t;
+
static BackendInfo *lback;
typedef struct ldap_chain_t {
struct berval odn = op->o_req_dn,
ondn = op->o_req_ndn;
slap_response *save_response = op->o_callback->sc_response;
+ Entry *save_entry = rs->sr_entry;
+ slap_mask_t save_flags = rs->sr_flags;
int rc = LDAP_OTHER,
first_rc = -1;
op->o_req_ndn = ondn;
op->o_callback->sc_response = save_response;
rs->sr_type = REP_SEARCHREF;
- rs->sr_entry = NULL;
+ rs->sr_entry = save_entry;
+ rs->sr_flags = save_flags;
if ( rc != LDAP_SUCCESS ) {
/* couldn't chase any of the referrals */
"NAME 'olcChainDatabase' "
"DESC 'Chain remote server configuration' "
"AUXILIARY )",
- Cft_Misc, chaincfg, chain_ldadd },
+ Cft_Misc, olcDatabaseDummy, chain_ldadd },
{ NULL, 0, NULL }
};
}
}
+ ca->ca_private = on;
+
done:;
if ( rc != LDAP_SUCCESS ) {
(void)ldap_chain_db_destroy_one( ca->be, NULL );
ldap_chain_t *lc = NULL;
if ( lback == NULL ) {
- static BackendInfo lback2;
-
lback = backend_info( "ldap" );
if ( lback == NULL ) {
return 1;
}
-
- lback2 = *lback;
- lback2.bi_type = ldapchain.on_bi.bi_type;
- lback = &lback2;
}
lc = ch_malloc( sizeof( ldap_chain_t ) );
int
chain_initialize( void )
{
- int rc;
+ int rc;
+ const char *text;
/* Make sure we don't exceed the bits reserved for userland */
config_check_userland( CH_LAST );