From b14487965086da06bbb364759dd2e2f0ed6f9418 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 27 Dec 2001 00:26:59 +0000 Subject: [PATCH] Quick struct berval DN support for defer alias API. Underlying code needs work. --- servers/slapd/back-bdb/proto-bdb.h | 2 +- servers/slapd/back-bdb/search.c | 2 +- servers/slapd/back-ldbm/alias.c | 4 ++-- servers/slapd/back-ldbm/proto-back-ldbm.h | 2 +- servers/slapd/back-ldbm/search.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/servers/slapd/back-bdb/proto-bdb.h b/servers/slapd/back-bdb/proto-bdb.h index 5861142f89..614af84116 100644 --- a/servers/slapd/back-bdb/proto-bdb.h +++ b/servers/slapd/back-bdb/proto-bdb.h @@ -15,7 +15,7 @@ LDAP_BEGIN_DECL Entry *bdb_deref_internal_r LDAP_P(( BackendDB *be, Entry *e, - const char *dn, + struct berval *dn, int *err, Entry **matched, const char **text )); diff --git a/servers/slapd/back-bdb/search.c b/servers/slapd/back-bdb/search.c index 4fe8393a24..6456432f55 100644 --- a/servers/slapd/back-bdb/search.c +++ b/servers/slapd/back-bdb/search.c @@ -73,7 +73,7 @@ bdb_search( #ifdef BDB_ALIASES /* get entry with reader lock */ if ( deref & LDAP_DEREF_FINDING ) { - e = deref_dn_r( be, nbase->bv_val, &err, &matched, &text ); + e = deref_dn_r( be, nbase-, &err, &matched, &text ); } else #endif diff --git a/servers/slapd/back-ldbm/alias.c b/servers/slapd/back-ldbm/alias.c index f04428ad14..e78fb6c537 100644 --- a/servers/slapd/back-ldbm/alias.c +++ b/servers/slapd/back-ldbm/alias.c @@ -31,7 +31,7 @@ static int dnlist_subordinate( Entry *deref_internal_r( Backend* be, Entry* alias, - const char* dn_in, + struct berval* dn_in, int* err, Entry** matched, const char** text ) @@ -51,7 +51,7 @@ Entry *deref_internal_r( *text = NULL; if( alias == NULL ) { - dn = ch_strdup( dn_in ); + dn = ch_strdup( dn_in->bv_val ); entry = dn2entry_r( be, dn, &sup ); } else { diff --git a/servers/slapd/back-ldbm/proto-back-ldbm.h b/servers/slapd/back-ldbm/proto-back-ldbm.h index 703621932f..4433f736cf 100644 --- a/servers/slapd/back-ldbm/proto-back-ldbm.h +++ b/servers/slapd/back-ldbm/proto-back-ldbm.h @@ -19,7 +19,7 @@ LDAP_BEGIN_DECL Entry *deref_internal_r LDAP_P(( Backend *be, Entry *e, - const char *dn, + struct berval *dn, int *err, Entry **matched, const char **text )); diff --git a/servers/slapd/back-ldbm/search.c b/servers/slapd/back-ldbm/search.c index 6ba0b67afa..f3ddf38c61 100644 --- a/servers/slapd/back-ldbm/search.c +++ b/servers/slapd/back-ldbm/search.c @@ -79,7 +79,7 @@ ldbm_back_search( } else if ( deref & LDAP_DEREF_FINDING ) { /* deref dn and get entry with reader lock */ - e = deref_dn_r( be, nbase->bv_val, &err, &matched, &text ); + e = deref_dn_r( be, nbase, &err, &matched, &text ); if( err == LDAP_NO_SUCH_OBJECT ) err = LDAP_REFERRAL; -- 2.39.5