BackendDB *be,
Connection *conn,
Operation *op,
- const char *dn,
- const char *ndn,
+ struct berval *dn,
+ struct berval *ndn,
const char **text )
{
struct bdb_info *bdb = (struct bdb_info *) be->be_private;
}
/* get entry */
- rc = bdb_dn2entry( be, NULL, ndn, &e, &matched, 0 );
+ rc = bdb_dn2entry( be, NULL, ndn->bv_val, &e, &matched, 0 );
switch(rc) {
case DB_NOTFOUND:
if( is_entry_referral( matched ) ) {
rc = LDAP_OTHER;
refs = get_entry_referrals( be, conn, op,
- matched, dn, LDAP_SCOPE_DEFAULT );
+ matched, dn->bv_val, LDAP_SCOPE_DEFAULT );
}
bdb_entry_return( be, matched );
} else if ( default_referral != NULL ) {
rc = LDAP_OTHER;
refs = referral_rewrite( default_referral,
- NULL, dn, LDAP_SCOPE_DEFAULT );
+ NULL, dn->bv_val, LDAP_SCOPE_DEFAULT );
}
if( refs != NULL ) {
if ( is_entry_referral( e ) ) {
/* entry is a referral */
struct berval **refs = get_entry_referrals( be,
- conn, op, e, dn, LDAP_SCOPE_DEFAULT );
+ conn, op, e, dn->bv_val, LDAP_SCOPE_DEFAULT );
struct berval **rrefs = referral_rewrite(
- refs, e->e_dn, dn, LDAP_SCOPE_DEFAULT );
+ refs, e->e_dn, dn->bv_val, LDAP_SCOPE_DEFAULT );
Debug( LDAP_DEBUG_TRACE,
"bdb_referrals: op=%ld target=\"%s\" matched=\"%s\"\n",
- (long) op->o_tag, dn, e->e_dn );
+ (long) op->o_tag, dn->bv_val, e->e_dn );
if( rrefs != NULL ) {
send_ldap_result( conn, op, rc = LDAP_REFERRAL,
Backend *be,
Connection *conn,
Operation *op,
- const char *dn,
- const char *ndn,
+ struct berval *dn,
+ struct berval *ndn,
const char **text )
{
struct ldbminfo *li = (struct ldbminfo *) be->be_private;
}
/* get entry with reader lock */
- e = dn2entry_r( be, ndn, &matched );
+ e = dn2entry_r( be, ndn->bv_val, &matched );
if ( e == NULL ) {
char *matched_dn = NULL;
struct berval **refs = NULL;
#ifdef NEW_LOGGING
LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
"ldbm_back_referrals: op=%ld target=\"%s\" matched=\"%s\"\n",
- op->o_tag, dn, matched_dn ));
+ op->o_tag, dn->bv_val, matched_dn ));
#else
Debug( LDAP_DEBUG_TRACE,
"ldbm_referrals: op=%ld target=\"%s\" matched=\"%s\"\n",
- op->o_tag, dn, matched_dn );
+ op->o_tag, dn->bv_val, matched_dn );
#endif
if( is_entry_referral( matched ) ) {
rc = LDAP_OTHER;
refs = get_entry_referrals( be, conn, op, matched,
- dn, LDAP_SCOPE_DEFAULT );
+ dn->bv_val, LDAP_SCOPE_DEFAULT );
}
cache_return_entry_r( &li->li_cache, matched );
} else if ( default_referral != NULL ) {
rc = LDAP_OTHER;
refs = referral_rewrite( default_referral,
- NULL, dn, LDAP_SCOPE_DEFAULT );
+ NULL, dn->bv_val, LDAP_SCOPE_DEFAULT );
}
if( refs != NULL ) {
if ( is_entry_referral( e ) ) {
/* entry is a referral */
struct berval **refs = get_entry_referrals( be,
- conn, op, e, dn, LDAP_SCOPE_DEFAULT );
+ conn, op, e, dn->bv_val, LDAP_SCOPE_DEFAULT );
struct berval **rrefs = referral_rewrite(
- refs, e->e_dn, dn, LDAP_SCOPE_DEFAULT );
+ refs, e->e_dn, dn->bv_val, LDAP_SCOPE_DEFAULT );
#ifdef NEW_LOGGING
LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
"ldbm_referrals: op=%ld target=\"%s\" matched=\"%s\"\n",
- op->o_tag, dn, e->e_dn ));
+ op->o_tag, dn->bv_val, e->e_dn ));
#else
Debug( LDAP_DEBUG_TRACE,
"ldbm_referrals: op=%ld target=\"%s\" matched=\"%s\"\n",
- op->o_tag, dn, e->e_dn );
+ op->o_tag, dn->bv_val, e->e_dn );
#endif
if( rrefs != NULL ) {
bi->bi_controls = controls;
- bi->bi_init = NULL;
+ bi->bi_init = 0;
bi->bi_open = monitor_back_open;
bi->bi_config = monitor_back_config;
- bi->bi_close = NULL;
- bi->bi_destroy = NULL;
+ bi->bi_close = 0;
+ bi->bi_destroy = 0;
bi->bi_db_init = monitor_back_db_init;
bi->bi_db_config = monitor_back_db_config;
- bi->bi_db_open = NULL;
- bi->bi_db_close = NULL;
+ bi->bi_db_open = 0;
+ bi->bi_db_close = 0;
bi->bi_db_destroy = monitor_back_db_destroy;
bi->bi_op_bind = monitor_back_bind;
- bi->bi_op_unbind = NULL;
+ bi->bi_op_unbind = 0;
bi->bi_op_search = monitor_back_search;
bi->bi_op_compare = monitor_back_compare;
bi->bi_op_modify = monitor_back_modify;
- bi->bi_op_modrdn = NULL;
- bi->bi_op_add = NULL;
- bi->bi_op_delete = NULL;
+ bi->bi_op_modrdn = 0;
+ bi->bi_op_add = 0;
+ bi->bi_op_delete = 0;
bi->bi_op_abandon = monitor_back_abandon;
- bi->bi_extended = NULL;
+ bi->bi_extended = 0;
- bi->bi_entry_release_rw = NULL;
- bi->bi_acl_group = NULL;
- bi->bi_acl_attribute = NULL;
- bi->bi_chk_referrals = NULL;
+ bi->bi_entry_release_rw = 0;
+ bi->bi_acl_group = 0;
+ bi->bi_acl_attribute = 0;
+ bi->bi_chk_referrals = 0;
bi->bi_operational = monitor_back_operational;
/*
* hooks for slap tools
*/
- bi->bi_tool_entry_open = NULL;
- bi->bi_tool_entry_close = NULL;
- bi->bi_tool_entry_first = NULL;
- bi->bi_tool_entry_next = NULL;
- bi->bi_tool_entry_get = NULL;
- bi->bi_tool_entry_put = NULL;
- bi->bi_tool_entry_reindex = NULL;
- bi->bi_tool_sync = NULL;
+ bi->bi_tool_entry_open = 0;
+ bi->bi_tool_entry_close = 0;
+ bi->bi_tool_entry_first = 0;
+ bi->bi_tool_entry_next = 0;
+ bi->bi_tool_entry_get = 0;
+ bi->bi_tool_entry_put = 0;
+ bi->bi_tool_entry_reindex = 0;
+ bi->bi_tool_sync = 0;
bi->bi_connection_init = 0;
bi->bi_connection_destroy = 0;
const char *text;
rc = be->be_chk_referrals( be,
- conn, op, dn->bv_val, ndn->bv_val, &text );
+ conn, op, dn, ndn, &text );
if( rc != LDAP_SUCCESS && rc != LDAP_REFERRAL ) {
send_ldap_result( conn, op, rc,
BackendDB *b0,
Connection *conn,
Operation *op,
- const char *dn,
- const char *ndn,
+ struct berval *dn,
+ struct berval *ndn,
const char **text
)
{
BackendDB *be;
int rc;
- be = glue_back_select (b0, ndn);
+ be = glue_back_select (b0, ndn->bv_val);
if (be && be->be_chk_referrals) {
rc = be->be_chk_referrals (be, conn, op, dn, ndn, text);
# End Source File
# Begin Source File
+SOURCE=.\configinfo.c
+# End Source File
+# Begin Source File
+
SOURCE=.\connection.c
# End Source File
# Begin Source File
typedef int (BI_chk_referrals) LDAP_P((BackendDB *bd,
struct slap_conn *c, struct slap_op *o,
- const char *dn, const char *ndn,
+ struct berval *dn, struct berval *ndn,
const char **text ));
typedef int (BI_acl_group) LDAP_P((Backend *bd,