Much clean up is needed.
BackendDB *be,
Connection *conn,
Operation *op,
- const char *dn,
- const char *ndn,
+ struct berval *dn,
+ struct berval *ndn,
Modifications *modlist )
{
struct bdb_info *bdb = (struct bdb_info *) be->be_private;
op->o_private = &opinfo;
/* get entry */
- rc = bdb_dn2entry( be, ltid, ndn, &e, &matched, 0 );
+ rc = bdb_dn2entry( be, ltid, ndn->bv_val, &e, &matched, 0 );
if ( rc != 0 ) {
Debug( LDAP_DEBUG_TRACE,
matched_dn = ch_strdup( matched->e_dn );
refs = is_entry_referral( matched )
? get_entry_referrals( be, conn, op, matched,
- dn, LDAP_SCOPE_DEFAULT )
+ dn->bv_val, LDAP_SCOPE_DEFAULT )
: NULL;
bdb_entry_return( be, matched );
matched = NULL;
} else {
refs = referral_rewrite( default_referral,
- NULL, dn, LDAP_SCOPE_DEFAULT );
+ NULL, dn->bv_val, LDAP_SCOPE_DEFAULT );
}
send_ldap_result( conn, op, rc = LDAP_REFERRAL,
/* parent is a referral, don't allow add */
/* parent is an alias, don't allow add */
struct berval **refs = get_entry_referrals( be,
- conn, op, e, dn, LDAP_SCOPE_DEFAULT );
+ conn, op, e, dn->bv_val, LDAP_SCOPE_DEFAULT );
Debug( LDAP_DEBUG_TRACE,
"bdb_modify: entry is referral\n",
int
bdb_modrdn(
- Backend *be,
- Connection *conn,
- Operation *op,
- const char *dn,
- const char *ndn,
- const char *newrdn,
- int deleteoldrdn,
- const char *newSuperior
+ Backend *be,
+ Connection *conn,
+ Operation *op,
+ struct berval *dn,
+ struct berval *ndn,
+ struct berval *newrdn,
+ struct berval *nnewrdn,
+ int deleteoldrdn,
+ struct berval *newSuperior,
+ struct berval *nnewSuperior
)
{
struct bdb_info *bdb = (struct bdb_info *) be->be_private;
int manageDSAit = get_manageDSAit( op );
Debug( LDAP_DEBUG_TRACE, "==>bdb_modrdn(%s,%s,%s)\n",
- dn, newrdn, (newSuperior ? newSuperior : "NULL") );
+ dn->bv_val, newrdn->bv_val,
+ newSuperior ? newSuperior->bv_val : "NULL" );
#if 0
if( newSuperior != NULL ) {
op->o_private = &opinfo;
/* get entry */
- rc = bdb_dn2entry( be, ltid, ndn, &e, &matched, 0 );
+ rc = bdb_dn2entry( be, ltid, ndn->bv_val, &e, &matched, 0 );
switch( rc ) {
case 0:
matched_dn = strdup( matched->e_dn );
refs = is_entry_referral( matched )
? get_entry_referrals( be, conn, op, matched,
- dn, LDAP_SCOPE_DEFAULT )
+ dn->bv_val, LDAP_SCOPE_DEFAULT )
: NULL;
bdb_entry_return( be, matched );
matched = NULL;
} else {
refs = referral_rewrite( default_referral,
- NULL, dn, LDAP_SCOPE_DEFAULT );
+ NULL, dn->bv_val, LDAP_SCOPE_DEFAULT );
}
send_ldap_result( conn, op, rc = LDAP_REFERRAL,
/* parent is a referral, don't allow add */
/* parent is an alias, don't allow add */
struct berval **refs = get_entry_referrals( be,
- conn, op, e, dn, LDAP_SCOPE_DEFAULT );
+ conn, op, e, dn->bv_val, LDAP_SCOPE_DEFAULT );
Debug( LDAP_DEBUG_TRACE, "bdb_modrdn: entry %s is referral\n",
e->e_dn, 0, 0 );
if ( newSuperior != NULL ) {
Debug( LDAP_DEBUG_TRACE,
"bdb_modrdn: new parent \"%s\" requested...\n",
- newSuperior, 0, 0 );
+ newSuperior->bv_val, 0, 0 );
- if ( newSuperior[ 0 ] != '\0' ) {
- np_dn = ch_strdup( newSuperior );
+ if ( newSuperior->bv_len ) {
+ np_dn = ch_strdup( newSuperior->bv_val );
np_ndn = ch_strdup( np_dn );
(void) dn_normalize( np_ndn );
}
/* Build target dn and make sure target entry doesn't exist already. */
- build_new_dn( &new_dn, e->e_dn, new_parent_dn, newrdn );
+ build_new_dn( &new_dn, e->e_dn, new_parent_dn, newrdn->bv_val );
- new_ndn = ch_strdup(new_dn);
+ new_ndn = ch_strdup( new_dn );
(void) dn_normalize( new_ndn );
Debug( LDAP_DEBUG_TRACE, "bdb_modrdn: new ndn=%s\n",
* need to add that to our new entry
*/
- if ( rdn_attrs( newrdn, &new_rdn_types, &new_rdn_vals ) ) {
+ if ( rdn_attrs( newrdn->bv_val, &new_rdn_types, &new_rdn_vals ) ) {
Debug( LDAP_DEBUG_TRACE,
"bdb_modrdn: can't figure out type(s)/values(s) "
"of newrdn\n", 0, 0, 0 );
Debug( LDAP_DEBUG_TRACE,
"bdb_modrdn: new_rdn_val=\"%s\", new_rdn_type=\"%s\"\n",
- new_rdn_vals[ 0 ], new_rdn_types[ 0 ], 0 );
+ new_rdn_vals[0], new_rdn_types[0], 0 );
/* Retrieve the old rdn from the entry's dn */
- if ( ( old_rdn = dn_rdn( be, dn ) ) == NULL ) {
+ if ( ( old_rdn = dn_rdn( be, dn->bv_val ) ) == NULL ) {
Debug( LDAP_DEBUG_TRACE,
"bdb_modrdn: can't figure out old_rdn from dn\n",
0, 0, 0 );
BackendDB *be,
Connection *conn,
Operation *op,
- const char *base,
- const char *nbase,
+ struct berval *base,
+ struct berval *nbase,
int scope,
int deref,
int slimit,
manageDSAit = get_manageDSAit( op );
- if ( *nbase == '\0' ) {
+ if ( nbase->bv_len == 0 ) {
/* DIT root special case */
e = (Entry *) &slap_entry_root;
rc = 0;
#ifdef BDB_ALIASES
/* get entry with reader lock */
if ( deref & LDAP_DEREF_FINDING ) {
- e = deref_dn_r( be, nbase, &err, &matched, &text );
+ e = deref_dn_r( be, nbase->bv_val, &err, &matched, &text );
} else
#endif
{
- rc = bdb_dn2entry( be, NULL, nbase, &e, &matched, 0 );
+ rc = bdb_dn2entry( be, NULL, nbase->bv_val, &e, &matched, 0 );
}
switch(rc) {
erefs = is_entry_referral( matched )
? get_entry_referrals( be, conn, op, matched,
- base, scope )
+ base->bv_val, scope )
: NULL;
bdb_entry_return( be, matched );
if( erefs ) {
refs = referral_rewrite( erefs, matched_dn,
- base, scope );
+ base->bv_val, scope );
ber_bvecfree( erefs );
}
} else {
refs = referral_rewrite( default_referral,
- NULL, base, scope );
+ NULL, base->bv_val, scope );
}
send_ldap_result( conn, op, rc=LDAP_REFERRAL ,
/* entry is a referral, don't allow add */
char *matched_dn = ch_strdup( e->e_dn );
struct berval **erefs = get_entry_referrals( be,
- conn, op, e, base, scope );
+ conn, op, e, base->bv_val, scope );
struct berval **refs = NULL;
bdb_entry_return( be, e );
if( erefs ) {
refs = referral_rewrite( erefs, matched_dn,
- base, scope );
+ base->bv_val, scope );
ber_bvecfree( erefs );
}
Backend *be,
Connection *conn,
Operation *op,
- const char *dn,
- const char *ndn,
+ struct berval *dn,
+ struct berval *ndn,
Modifications *modlist
)
{
/* acquire and lock entry */
- if ( (e = dn2entry_w( be, ndn, &matched )) == NULL ) {
+ if ( (e = dn2entry_w( be, ndn->bv_val, &matched )) == NULL ) {
char* matched_dn = NULL;
struct berval **refs;
matched_dn = ch_strdup( matched->e_dn );
refs = is_entry_referral( matched )
? get_entry_referrals( be, conn, op, matched,
- dn, LDAP_SCOPE_DEFAULT )
+ dn->bv_val, LDAP_SCOPE_DEFAULT )
: NULL;
cache_return_entry_r( &li->li_cache, matched );
} else {
refs = referral_rewrite( default_referral,
- NULL, dn, LDAP_SCOPE_DEFAULT );
+ NULL, dn->bv_val, LDAP_SCOPE_DEFAULT );
}
send_ldap_result( conn, op, LDAP_REFERRAL,
/* parent is a referral, don't allow add */
/* parent is an alias, don't allow add */
struct berval **refs = get_entry_referrals( be,
- conn, op, e, dn, LDAP_SCOPE_DEFAULT );
+ conn, op, e, dn->bv_val, LDAP_SCOPE_DEFAULT );
#ifdef NEW_LOGGING
LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "ldbm_back_modify: entry (%s) is referral\n", ndn ));
+ "ldbm_back_modify: entry (%s) is referral\n", ndn->bv_val ));
#else
Debug( LDAP_DEBUG_TRACE, "entry is referral\n", 0,
0, 0 );
}
/* Modify the entry */
- rc = ldbm_modify_internal( be, conn, op, ndn, modlist, e,
+ rc = ldbm_modify_internal( be, conn, op, ndn->bv_val, modlist, e,
&text, textbuf, textlen );
if( rc != LDAP_SUCCESS ) {
Backend *be,
Connection *conn,
Operation *op,
- const char *dn,
- const char *ndn,
- const char *newrdn,
+ struct berval *dn,
+ struct berval *ndn,
+ struct berval *newrdn,
+ struct berval *nnewrdn,
int deleteoldrdn,
- const char *newSuperior
+ struct berval *newSuperior,
+ struct berval *nnewSuperior
)
{
AttributeDescription *children = slap_schema.si_ad_children;
#ifdef NEW_LOGGING
LDAP_LOG(( "backend", LDAP_LEVEL_ENTRY,
"ldbm_back_modrdn: dn: %s newSuperior=%s\n",
- dn ? dn : "NULL", newSuperior ? newSuperior : "NULL" ));
+ dn->bv_len ? dn->bv_val : "NULL",
+ newSuperior->bv_len ? newSuperior->bv_val : "NULL" ));
#else
- Debug( LDAP_DEBUG_TRACE, "==>ldbm_back_modrdn(newSuperior=%s)\n",
- (newSuperior ? newSuperior : "NULL"),
- 0, 0 );
+ Debug( LDAP_DEBUG_TRACE,
+ "==>ldbm_back_modrdn: dn: %s newSuperior=%s\n",
+ dn->bv_len ? dn->bv_val : "NULL",
+ newSuperior->bv_len ? newSuperior->bv_val : "NULL", 0 );
#endif
/* get entry with writer lock */
- if ( (e = dn2entry_w( be, ndn, &matched )) == NULL ) {
+ if ( (e = dn2entry_w( be, ndn->bv_val, &matched )) == NULL ) {
char* matched_dn = NULL;
struct berval** refs;
matched_dn = strdup( matched->e_dn );
refs = is_entry_referral( matched )
? get_entry_referrals( be, conn, op, matched,
- dn, LDAP_SCOPE_DEFAULT )
+ dn->bv_val, LDAP_SCOPE_DEFAULT )
: NULL;
cache_return_entry_r( &li->li_cache, matched );
} else {
refs = referral_rewrite( default_referral,
- NULL, dn, LDAP_SCOPE_DEFAULT );
+ NULL, dn->bv_val, LDAP_SCOPE_DEFAULT );
}
send_ldap_result( conn, op, LDAP_REFERRAL,
/* parent is a referral, don't allow add */
/* parent is an alias, don't allow add */
struct berval **refs = get_entry_referrals( be,
- conn, op, e, dn, LDAP_SCOPE_DEFAULT );
+ conn, op, e, dn->bv_val, LDAP_SCOPE_DEFAULT );
#ifdef NEW_LOGGING
LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
newSuperior, 0, 0 );
#endif
- np_dn = ch_strdup( newSuperior );
+ np_dn = ch_strdup( newSuperior->bv_val );
np_ndn = ch_strdup( np_dn );
(void) dn_normalize( np_ndn );
/* newSuperior == entry being moved?, if so ==> ERROR */
/* Get Entry with dn=newSuperior. Does newSuperior exist? */
- if ( newSuperior[ 0 ] != '\0' ) {
-
+ if ( nnewSuperior->bv_len ) {
if( (np = dn2entry_w( be, np_ndn, NULL )) == NULL) {
#ifdef NEW_LOGGING
LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
}
/* Build target dn and make sure target entry doesn't exist already. */
- build_new_dn( &new_dn, e->e_dn, new_parent_dn, newrdn );
+ build_new_dn( &new_dn, e->e_dn, new_parent_dn, newrdn->bv_val );
- new_ndn = ch_strdup(new_dn);
+ new_ndn = ch_strdup( new_dn );
(void) dn_normalize( new_ndn );
#ifdef NEW_LOGGING
#ifdef NEW_LOGGING
LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "ldbm_back_modrdn: new ndn (%s) does not exist\n", new_ndn ));
+ "ldbm_back_modrdn: new ndn (%s) does not exist\n", new_ndn ));
#else
Debug( LDAP_DEBUG_TRACE,
- "ldbm_back_modrdn: new ndn=%s does not exist\n",
- new_ndn, 0, 0 );
+ "ldbm_back_modrdn: new ndn=%s does not exist\n",
+ new_ndn, 0, 0 );
#endif
/* Get attribute types and values of our new rdn, we will
* need to add that to our new entry
*/
- if ( rdn_attrs( newrdn, &new_rdn_types, &new_rdn_vals ) ) {
+ if ( rdn_attrs( newrdn->bv_val, &new_rdn_types, &new_rdn_vals ) ) {
#ifdef NEW_LOGGING
LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "ldbm_back_modrdn: can't figure out type(s)/value(s) of newrdn\n" ));
+ "ldbm_back_modrdn: can't figure out type(s)/value(s) of newrdn\n" ));
#else
Debug( LDAP_DEBUG_TRACE,
- "ldbm_back_modrdn: can't figure out type(s)/value(s) of newrdn\n",
- 0, 0, 0 );
+ "ldbm_back_modrdn: can't figure out type(s)/value(s) of newrdn\n",
+ 0, 0, 0 );
#endif
send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
#endif
/* Retrieve the old rdn from the entry's dn */
- if ( (old_rdn = dn_rdn( be, dn )) == NULL ) {
+ if ( (old_rdn = dn_rdn( be, dn->bv_val )) == NULL ) {
#ifdef NEW_LOGGING
LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
"ldbm_back_modrdn: can't figure out old_rdn from dn (%s)\n",
- dn ));
+ dn->bv_val ));
#else
Debug( LDAP_DEBUG_TRACE,
"ldbm_back_modrdn: can't figure out old_rdn from dn\n",
}
/* modify memory copy of entry */
- rc = ldbm_modify_internal( be, conn, op, dn, &mod[0], e,
+ rc = ldbm_modify_internal( be, conn, op, dn->bv_val, &mod[0], e,
&text, textbuf, textlen );
if( rc != LDAP_SUCCESS ) {
Backend *be,
Connection *conn,
Operation *op,
- const char *base,
- const char *nbase,
+ struct berval *base,
+ struct berval *nbase,
int scope,
int deref,
int slimit,
#ifdef NEW_LOGGING
LDAP_LOG(( "backend", LDAP_LEVEL_ENTRY,
- "ldbm_back_search: enter\n" ));
+ "ldbm_back_search: enter\n" ));
#else
Debug(LDAP_DEBUG_TRACE, "=> ldbm_back_search\n", 0, 0, 0);
#endif
- if ( *nbase == '\0' ) {
+ if ( nbase->bv_len == 0 ) {
/* DIT root special case */
e = (Entry *) &slap_entry_root;
} else if ( deref & LDAP_DEREF_FINDING ) {
/* deref dn and get entry with reader lock */
- e = deref_dn_r( be, nbase, &err, &matched, &text );
+ e = deref_dn_r( be, nbase->bv_val, &err, &matched, &text );
if( err == LDAP_NO_SUCH_OBJECT ) err = LDAP_REFERRAL;
} else {
/* get entry with reader lock */
- e = dn2entry_r( be, nbase, &matched );
+ e = dn2entry_r( be, nbase->bv_val, &matched );
err = e != NULL ? LDAP_SUCCESS : LDAP_REFERRAL;
text = NULL;
}
erefs = is_entry_referral( matched )
? get_entry_referrals( be, conn, op, matched,
- base, scope )
+ base->bv_val, scope )
: NULL;
cache_return_entry_r( &li->li_cache, matched );
if( erefs ) {
refs = referral_rewrite( erefs, matched_dn,
- base, scope );
+ base->bv_val, scope );
ber_bvecfree( erefs );
}
} else {
refs = referral_rewrite( default_referral,
- NULL, base, scope );
+ NULL, base->bv_val, scope );
}
send_ldap_result( conn, op, err,
/* entry is a referral, don't allow add */
char *matched_dn = ch_strdup( e->e_dn );
struct berval **erefs = get_entry_referrals( be,
- conn, op, e, base, scope );
+ conn, op, e, base->bv_val, scope );
struct berval **refs = NULL;
cache_return_entry_r( &li->li_cache, e );
if( erefs ) {
refs = referral_rewrite( erefs, matched_dn,
- base, scope );
+ base->bv_val, scope );
ber_bvecfree( erefs );
}
Backend *be,
Connection *conn,
Operation *op,
- const char *dn,
- const char *ndn,
+ struct berval *dn,
+ struct berval *ndn,
Modifications *modlist
)
{
#endif
/* acquire and lock entry */
- monitor_cache_dn2entry( mi, ndn, &e, &matched );
+ monitor_cache_dn2entry( mi, ndn->bv_val, &e, &matched );
if ( e == NULL ) {
send_ldap_result( conn, op, LDAP_NO_SUCH_OBJECT,
matched ? matched->e_dn : NULL,
int
monitor_back_search(
Backend *be,
- Connection *conn,
- Operation *op,
- const char *base,
- const char *nbase,
- int scope,
- int deref,
- int slimit,
- int tlimit,
- Filter *filter,
- const char *filterstr,
- struct berval **attrs,
- int attrsonly
+ Connection *conn,
+ Operation *op,
+ struct berval *base,
+ struct berval *nbase,
+ int scope,
+ int deref,
+ int slimit,
+ int tlimit,
+ Filter *filter,
+ const char *filterstr,
+ struct berval **attrs,
+ int attrsonly
)
{
struct monitorinfo *mi = (struct monitorinfo *) be->be_private;
/* get entry with reader lock */
- monitor_cache_dn2entry( mi, nbase, &e, &matched );
+ monitor_cache_dn2entry( mi, nbase->bv_val, &e, &matched );
if ( e == NULL ) {
send_ldap_result( conn, op, LDAP_NO_SUCH_OBJECT,
matched ? matched->e_dn : NULL,
BackendDB *b0,
Connection *conn,
Operation *op,
- const char *dn,
- const char *ndn,
+ struct berval *dn,
+ struct berval *ndn,
int scope,
int deref,
int slimit,
struct berval bv;
- if (tlimit)
+ if (tlimit) {
stoptime = slap_get_time () + tlimit;
+ }
switch (scope) {
case LDAP_SCOPE_BASE:
- be = glue_back_select (b0, ndn);
+ be = glue_back_select (b0, ndn->bv_val);
if (be && be->be_search) {
rc = be->be_search (be, conn, op, dn, ndn, scope,
op->o_glue = &gs;
op->o_sresult = glue_back_sresult;
op->o_response = glue_back_response;
- bv.bv_len = strlen(ndn);
- bv.bv_val = (char *) ndn;
/*
* Execute in reverse order, most general first
}
be = gi->n[i].be;
if (scope == LDAP_SCOPE_ONELEVEL &&
- !strcmp (gi->n[i].pdn, ndn)) {
+ !strcmp (gi->n[i].pdn, ndn->bv_val)) {
rc = be->be_search (be, conn, op,
- be->be_suffix[0]->bv_val,
- be->be_nsuffix[0]->bv_val,
- LDAP_SCOPE_BASE, deref,
+ be->be_suffix[0], be->be_nsuffix[0],
+ LDAP_SCOPE_BASE, deref,
s2limit, t2limit, filter, filterstr,
- attrs, attrsonly);
+ attrs, attrsonly);
+
} else if (scope == LDAP_SCOPE_SUBTREE &&
- dnIsSuffix(be->be_nsuffix[0], &bv)) {
+ dnIsSuffix(be->be_nsuffix[0], ndn)) {
rc = be->be_search (be, conn, op,
- be->be_suffix[0]->bv_val,
- be->be_nsuffix[0]->bv_val,
- scope, deref,
+ be->be_suffix[0], be->be_nsuffix[0],
+ scope, deref,
s2limit, t2limit, filter, filterstr,
- attrs, attrsonly);
+ attrs, attrsonly);
+
} else if (dnIsSuffix(&bv, be->be_nsuffix[0])) {
- rc = be->be_search (be, conn, op,
- dn, ndn, scope, deref,
+ rc = be->be_search (be, conn, op, dn, ndn,
+ scope, deref,
s2limit, t2limit, filter, filterstr,
- attrs, attrsonly);
+ attrs, attrsonly);
}
}
break;
op->o_response = NULL;
op->o_glue = NULL;
- send_search_result (conn, op, gs.err, gs.matched, NULL, gs.refs,
- NULL, gs.nentries);
+ send_search_result (conn, op, gs.err, gs.matched, NULL,
+ gs.refs, NULL, gs.nentries);
+
done:
if (gs.matched)
free (gs.matched);
BackendDB *b0,
Connection *conn,
Operation *op,
- const char *dn,
- const char *ndn,
+ struct berval *dn,
+ struct berval *ndn,
Modifications *mod
)
{
BackendDB *be;
int rc;
- be = glue_back_select (b0, ndn);
+ be = glue_back_select (b0, ndn->bv_val);
if (be && be->be_modify) {
rc = be->be_modify (be, conn, op, dn, ndn, mod);
} else {
rc = LDAP_UNWILLING_TO_PERFORM;
- send_ldap_result (conn, op, rc, NULL, "No modify target found",
- NULL, NULL);
+ send_ldap_result (conn, op, rc, NULL,
+ "No modify target found", NULL, NULL);
}
return rc;
}
BackendDB *b0,
Connection *conn,
Operation *op,
- const char *dn,
- const char *ndn,
- const char *newrdn,
+ struct berval *dn,
+ struct berval *ndn,
+ struct berval *newrdn,
+ struct berval *nnewrdn,
int del,
- const char *newsup
+ struct berval *newsup,
+ struct berval *nnewsup
)
{
BackendDB *be;
int rc;
- be = glue_back_select (b0, ndn);
+ be = glue_back_select (b0, ndn->bv_val);
if (be && be->be_modrdn) {
- rc = be->be_modrdn (be, conn, op, dn, ndn, newrdn, del, newsup);
+ rc = be->be_modrdn (be, conn, op, dn, ndn,
+ newrdn, nnewrdn, del, newsup, nnewsup );
} else {
rc = LDAP_UNWILLING_TO_PERFORM;
- send_ldap_result (conn, op, rc, NULL, "No modrdn target found",
- NULL, NULL);
+ send_ldap_result (conn, op, rc, NULL,
+ "No modrdn target found", NULL, NULL);
}
return rc;
}
}
}
- if ( (*be->be_modify)( be, conn, op, pdn->bv_val, ndn->bv_val, mods ) == 0
+ if ( (*be->be_modify)( be, conn, op, pdn, ndn, mods ) == 0
#ifdef SLAPD_MULTIMASTER
&& !repl_user
#endif
if ( !be->be_update_ndn.bv_len || repl_user )
#endif
{
- if ( (*be->be_modrdn)( be, conn, op, pdn->bv_val, ndn->bv_val,
- pnewrdn->bv_val, deloldrdn,
- pnewSuperior ? pnewSuperior->bv_val : NULL ) == 0
+ if ( (*be->be_modrdn)( be, conn, op, pdn, ndn,
+ pnewrdn, nnewrdn, deloldrdn,
+ pnewSuperior, nnewSuperior ) == 0
#ifdef SLAPD_MULTIMASTER
&& ( !be->be_update_ndn.bv_len || !repl_user )
#endif
/* actually do the search and send the result(s) */
if ( be->be_search ) {
- (*be->be_search)( be, conn, op, pbase->bv_val, nbase->bv_val,
+ (*be->be_search)( be, conn, op, pbase, nbase,
scope, deref, sizelimit,
timelimit, filter, fstr.bv_val, attrs, attrsonly );
} else {
/* Backend function typedefs */
typedef int (BI_init) LDAP_P((BackendInfo *bi));
-typedef int (BI_config) LDAP_P((BackendInfo *bi, const char *fname,
- int lineno, int argc, char **argv));
+typedef int (BI_config) LDAP_P((BackendInfo *bi,
+ const char *fname, int lineno,
+ int argc, char **argv));
typedef int (BI_open) LDAP_P((BackendInfo *bi));
typedef int (BI_close) LDAP_P((BackendInfo *bi));
typedef int (BI_destroy) LDAP_P((BackendInfo *bi));
typedef int (BI_db_init) LDAP_P((Backend *bd));
-typedef int (BI_db_config) LDAP_P((Backend *bd, const char *fname,
- int lineno, int argc, char **argv));
+typedef int (BI_db_config) LDAP_P((Backend *bd,
+ const char *fname, int lineno,
+ int argc, char **argv));
typedef int (BI_db_open) LDAP_P((Backend *bd));
typedef int (BI_db_close) LDAP_P((Backend *bd));
typedef int (BI_db_destroy) LDAP_P((Backend *bd));
struct slap_conn *c, struct slap_op *o ));
typedef int (BI_op_search) LDAP_P((BackendDB *bd,
struct slap_conn *c, struct slap_op *o,
- const char *base, const char *nbase,
+ struct berval *base, struct berval *nbase,
int scope, int deref,
int slimit, int tlimit,
Filter *f, const char *filterstr,
AttributeAssertion *ava));
typedef int (BI_op_modify) LDAP_P((BackendDB *bd,
struct slap_conn *c, struct slap_op *o,
- const char *dn, const char *ndn, Modifications *m));
+ struct berval *dn, struct berval *ndn,
+ Modifications *m));
typedef int (BI_op_modrdn) LDAP_P((BackendDB *bd,
struct slap_conn *c, struct slap_op *o,
- const char *dn, const char *ndn,
- const char *newrdn, int deleteoldrdn,
- const char *newSuperior));
+ struct berval *dn, struct berval *ndn,
+ struct berval *newrdn, struct berval *nnewrdn,
+ int deleteoldrdn,
+ struct berval *newSup, struct berval *nnewSup ));
typedef int (BI_op_add) LDAP_P((BackendDB *bd,
struct slap_conn *c, struct slap_op *o,
Entry *e));
struct slap_op;
struct slap_conn;
-typedef void (slap_response)(struct slap_conn *, struct slap_op *, ber_tag_t,
- ber_int_t, ber_int_t, const char *, const char *, struct berval **,
- const char *, struct berval *, struct berval *, LDAPControl **);
+typedef void (slap_response)( struct slap_conn *, struct slap_op *,
+ ber_tag_t, ber_int_t, ber_int_t, const char *, const char *,
+ struct berval **, const char *, struct berval *,
+ struct berval *, LDAPControl ** );
-typedef void (slap_sresult)(struct slap_conn *, struct slap_op *, ber_int_t,
- const char *, const char *, struct berval **, LDAPControl **,
- int nentries);
+typedef void (slap_sresult)( struct slap_conn *, struct slap_op *,
+ ber_int_t, const char *, const char *, struct berval **,
+ LDAPControl **, int nentries);
/*
* represents an operation pending from an ldap client