int
dn2idl(
Backend *be,
- const char *dn,
+ struct berval *dn,
int prefix,
ID_BLOCK **idlp
)
#ifdef NEW_LOGGING
LDAP_LOG(( "backend", LDAP_LEVEL_ENTRY,
- "dn2idl: \"%c%s\"\n", prefix, dn ));
+ "dn2idl: \"%c%s\"\n", prefix, dn->bv_val ));
#else
- Debug( LDAP_DEBUG_TRACE, "=> dn2idl( \"%c%s\" )\n", prefix, dn, 0 );
+ Debug( LDAP_DEBUG_TRACE, "=> dn2idl( \"%c%s\" )\n", prefix, dn->bv_val, 0 );
#endif
assert( idlp != NULL );
*idlp = NULL;
- if ( prefix == DN_SUBTREE_PREFIX && be_issuffix(be, dn) ) {
+ if ( prefix == DN_SUBTREE_PREFIX && be_issuffix(be, dn->bv_val) ) {
*idlp = ch_malloc( sizeof(ID) );
**idlp = ID_BLOCK_ALLIDS_VALUE;
return 0;
ldbm_datum_init( key );
- key.dsize = strlen( dn ) + 2;
+ key.dsize = dn->bv_len + 2;
key.dptr = ch_malloc( key.dsize );
- sprintf( key.dptr, "%c%s", prefix, dn );
+ sprintf( key.dptr, "%c%s", prefix, dn->bv_val );
*idlp = idl_fetch( be, db, key );
int dn2id_add LDAP_P(( Backend *be, const char *dn, ID id ));
int dn2id LDAP_P(( Backend *be, const char *dn, ID *idp ));
-int dn2idl LDAP_P(( Backend *be, const char *dn, int prefix, ID_BLOCK **idlp ));
+int dn2idl LDAP_P(( Backend *be, struct berval *dn, int prefix, ID_BLOCK **idlp ));
int dn2id_delete LDAP_P(( Backend *be, const char *dn, ID id ));
Entry * dn2entry_rw LDAP_P(( Backend *be, const char *dn, Entry **matched, int rw ));
fand.f_choice = scope == LDAP_SCOPE_SUBTREE
? SLAPD_FILTER_DN_SUBTREE
: SLAPD_FILTER_DN_ONE;
- fand.f_dn = e->e_ndn;
+ fand.f_dn = &e->e_nname;
fand.f_next = xf.f_or == filter ? filter : &xf ;
candidates = filter_candidates( be, &f );