2000-09-20 15:21:09 +08:00
|
|
|
/* dn2id.c - routines to deal with the dn2id index */
|
|
|
|
/* $OpenLDAP$ */
|
|
|
|
/*
|
|
|
|
* Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
|
|
|
|
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "portable.h"
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <ac/string.h>
|
|
|
|
|
|
|
|
#include "back-bdb.h"
|
2001-06-15 15:08:37 +08:00
|
|
|
#include "idl.h"
|
2000-09-20 15:21:09 +08:00
|
|
|
|
|
|
|
int
|
2000-09-22 14:46:32 +08:00
|
|
|
bdb_dn2id_add(
|
2000-09-28 06:28:59 +08:00
|
|
|
BackendDB *be,
|
2000-09-20 15:21:09 +08:00
|
|
|
DB_TXN *txn,
|
2001-12-06 11:26:37 +08:00
|
|
|
const char *pdn,
|
|
|
|
Entry *e )
|
2000-09-20 15:21:09 +08:00
|
|
|
{
|
|
|
|
int rc;
|
|
|
|
DBT key, data;
|
|
|
|
struct bdb_info *bdb = (struct bdb_info *) be->be_private;
|
|
|
|
DB *db = bdb->bi_dn2id->bdi_db;
|
|
|
|
|
2000-09-27 03:26:08 +08:00
|
|
|
Debug( LDAP_DEBUG_TRACE, "=> bdb_dn2id_add( \"%s\", 0x%08lx )\n",
|
2001-12-06 11:26:37 +08:00
|
|
|
e->e_ndn, (long) e->e_id, 0 );
|
|
|
|
assert( e->e_id != NOID );
|
2000-09-20 15:21:09 +08:00
|
|
|
|
|
|
|
DBTzero( &key );
|
2001-12-06 11:26:37 +08:00
|
|
|
key.size = strlen( e->e_ndn ) + 2;
|
2000-09-20 15:21:09 +08:00
|
|
|
key.data = ch_malloc( key.size );
|
|
|
|
((char *)key.data)[0] = DN_BASE_PREFIX;
|
2001-12-06 11:26:37 +08:00
|
|
|
AC_MEMCPY( &((char *)key.data)[1], e->e_ndn, key.size - 1 );
|
2000-09-20 15:21:09 +08:00
|
|
|
|
|
|
|
DBTzero( &data );
|
2001-12-06 11:26:37 +08:00
|
|
|
data.data = (char *) &e->e_id;
|
|
|
|
data.size = sizeof( e->e_id );
|
2000-09-20 15:21:09 +08:00
|
|
|
|
|
|
|
/* store it -- don't override */
|
|
|
|
rc = db->put( db, txn, &key, &data, DB_NOOVERWRITE );
|
|
|
|
if( rc != 0 ) {
|
2000-09-26 09:36:35 +08:00
|
|
|
Debug( LDAP_DEBUG_ANY, "=> bdb_dn2id_add: put failed: %s %d\n",
|
|
|
|
db_strerror(rc), rc, 0 );
|
2000-09-20 15:21:09 +08:00
|
|
|
goto done;
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
((char *)(key.data))[0] = DN_ONE_PREFIX;
|
|
|
|
|
|
|
|
if( pdn != NULL ) {
|
|
|
|
key.size = strlen( pdn ) + 2;
|
|
|
|
AC_MEMCPY( &((char*)key.data)[1],
|
|
|
|
pdn, key.size - 1 );
|
|
|
|
|
2001-12-06 11:26:37 +08:00
|
|
|
rc = bdb_idl_insert_key( be, db, txn, &key, e->e_id );
|
2000-09-20 15:21:09 +08:00
|
|
|
|
|
|
|
if( rc != 0 ) {
|
2000-09-26 09:36:35 +08:00
|
|
|
Debug( LDAP_DEBUG_ANY,
|
|
|
|
"=> bdb_dn2id_add: parent (%s) insert failed: %d\n",
|
|
|
|
pdn, rc, 0 );
|
2000-09-20 15:21:09 +08:00
|
|
|
goto done;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2000-09-24 07:15:40 +08:00
|
|
|
{
|
2001-12-06 11:26:37 +08:00
|
|
|
char **subtree = dn_subtree( be, e->e_ndn );
|
2000-09-20 15:21:09 +08:00
|
|
|
|
|
|
|
if( subtree != NULL ) {
|
|
|
|
int i;
|
|
|
|
((char *)key.data)[0] = DN_SUBTREE_PREFIX;
|
|
|
|
for( i=0; subtree[i] != NULL; i++ ) {
|
2001-12-07 14:48:12 +08:00
|
|
|
if (be_issuffix(be, subtree[i]))
|
|
|
|
continue;
|
2000-09-20 15:21:09 +08:00
|
|
|
key.size = strlen( subtree[i] ) + 2;
|
|
|
|
AC_MEMCPY( &((char *)key.data)[1],
|
|
|
|
subtree[i], key.size - 1 );
|
|
|
|
|
2001-12-06 11:26:37 +08:00
|
|
|
rc = bdb_idl_insert_key( be, db, txn, &key,
|
|
|
|
e->e_id );
|
2000-09-20 15:21:09 +08:00
|
|
|
|
|
|
|
if( rc != 0 ) {
|
2000-09-26 09:36:35 +08:00
|
|
|
Debug( LDAP_DEBUG_ANY,
|
|
|
|
"=> bdb_dn2id_add: subtree (%s) insert failed: %d\n",
|
|
|
|
subtree[i], rc, 0 );
|
2000-09-26 11:47:56 +08:00
|
|
|
break;
|
2000-09-20 15:21:09 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
charray_free( subtree );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
done:
|
|
|
|
ch_free( key.data );
|
2000-09-26 11:47:56 +08:00
|
|
|
Debug( LDAP_DEBUG_TRACE, "<= bdb_dn2id_add: %d\n", rc, 0, 0 );
|
2000-09-24 14:04:58 +08:00
|
|
|
return rc;
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
bdb_dn2id_delete(
|
2000-09-28 06:28:59 +08:00
|
|
|
BackendDB *be,
|
2000-09-24 14:04:58 +08:00
|
|
|
DB_TXN *txn,
|
2001-12-06 11:26:37 +08:00
|
|
|
const char *pdn,
|
2000-09-28 06:28:59 +08:00
|
|
|
const char *dn,
|
|
|
|
ID id )
|
2000-09-24 14:04:58 +08:00
|
|
|
{
|
|
|
|
int rc;
|
|
|
|
DBT key;
|
|
|
|
struct bdb_info *bdb = (struct bdb_info *) be->be_private;
|
|
|
|
DB *db = bdb->bi_dn2id->bdi_db;
|
|
|
|
|
2000-09-27 03:26:08 +08:00
|
|
|
Debug( LDAP_DEBUG_TRACE, "=> bdb_dn2id_delete( \"%s\", 0x%08lx )\n",
|
|
|
|
dn, id, 0 );
|
2000-09-24 14:04:58 +08:00
|
|
|
|
|
|
|
DBTzero( &key );
|
|
|
|
key.size = strlen( dn ) + 2;
|
|
|
|
key.data = ch_malloc( key.size );
|
2001-12-06 21:20:18 +08:00
|
|
|
key.flags = DB_DBT_USERMEM;
|
2000-09-24 14:04:58 +08:00
|
|
|
((char *)key.data)[0] = DN_BASE_PREFIX;
|
|
|
|
AC_MEMCPY( &((char *)key.data)[1], dn, key.size - 1 );
|
|
|
|
|
2001-12-06 11:26:37 +08:00
|
|
|
/* delete it */
|
2000-09-24 14:04:58 +08:00
|
|
|
rc = db->del( db, txn, &key, 0 );
|
|
|
|
if( rc != 0 ) {
|
2000-09-26 09:36:35 +08:00
|
|
|
Debug( LDAP_DEBUG_ANY, "=> bdb_dn2id_delete: delete failed: %s %d\n",
|
|
|
|
db_strerror(rc), rc, 0 );
|
2000-09-24 14:04:58 +08:00
|
|
|
goto done;
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
((char *)(key.data))[0] = DN_ONE_PREFIX;
|
|
|
|
|
|
|
|
if( pdn != NULL ) {
|
|
|
|
key.size = strlen( pdn ) + 2;
|
|
|
|
AC_MEMCPY( &((char*)key.data)[1],
|
|
|
|
pdn, key.size - 1 );
|
|
|
|
|
|
|
|
rc = bdb_idl_delete_key( be, db, txn, &key, id );
|
|
|
|
|
|
|
|
if( rc != 0 ) {
|
2000-09-26 09:36:35 +08:00
|
|
|
Debug( LDAP_DEBUG_ANY,
|
|
|
|
"=> bdb_dn2id_delete: parent (%s) delete failed: %d\n",
|
|
|
|
pdn, rc, 0 );
|
2000-09-24 14:04:58 +08:00
|
|
|
goto done;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
2001-12-03 22:04:06 +08:00
|
|
|
char **subtree = dn_subtree( be, dn );
|
2000-09-24 14:04:58 +08:00
|
|
|
|
|
|
|
if( subtree != NULL ) {
|
|
|
|
int i;
|
|
|
|
((char *)key.data)[0] = DN_SUBTREE_PREFIX;
|
|
|
|
for( i=0; subtree[i] != NULL; i++ ) {
|
|
|
|
key.size = strlen( subtree[i] ) + 2;
|
|
|
|
AC_MEMCPY( &((char *)key.data)[1],
|
|
|
|
subtree[i], key.size - 1 );
|
|
|
|
|
|
|
|
rc = bdb_idl_delete_key( be, db, txn, &key, id );
|
|
|
|
|
|
|
|
if( rc != 0 ) {
|
2000-09-26 09:36:35 +08:00
|
|
|
Debug( LDAP_DEBUG_ANY,
|
|
|
|
"=> bdb_dn2id_delete: subtree (%s) delete failed: %d\n",
|
|
|
|
subtree[i], rc, 0 );
|
|
|
|
charray_free( subtree );
|
2000-09-24 14:04:58 +08:00
|
|
|
goto done;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
charray_free( subtree );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
done:
|
|
|
|
ch_free( key.data );
|
|
|
|
Debug( LDAP_DEBUG_TRACE, "<= bdb_dn2id_delete %d\n", rc, 0, 0 );
|
|
|
|
return rc;
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
2000-09-25 06:48:13 +08:00
|
|
|
bdb_dn2id(
|
2000-09-28 06:28:59 +08:00
|
|
|
BackendDB *be,
|
2000-09-24 14:04:58 +08:00
|
|
|
DB_TXN *txn,
|
2000-09-28 06:28:59 +08:00
|
|
|
const char *dn,
|
2000-09-25 06:48:13 +08:00
|
|
|
ID *id )
|
2000-09-24 14:04:58 +08:00
|
|
|
{
|
|
|
|
int rc;
|
|
|
|
DBT key, data;
|
|
|
|
struct bdb_info *bdb = (struct bdb_info *) be->be_private;
|
|
|
|
DB *db = bdb->bi_dn2id->bdi_db;
|
|
|
|
|
2000-09-25 06:48:13 +08:00
|
|
|
Debug( LDAP_DEBUG_TRACE, "=> bdb_dn2id( \"%s\" )\n", dn, 0, 0 );
|
2000-09-24 14:04:58 +08:00
|
|
|
|
|
|
|
DBTzero( &key );
|
|
|
|
key.size = strlen( dn ) + 2;
|
|
|
|
key.data = ch_malloc( key.size );
|
2000-09-25 06:48:13 +08:00
|
|
|
((char *)key.data)[0] = DN_BASE_PREFIX;
|
2000-09-24 14:04:58 +08:00
|
|
|
AC_MEMCPY( &((char *)key.data)[1], dn, key.size - 1 );
|
|
|
|
|
2000-09-25 06:48:13 +08:00
|
|
|
/* store the ID */
|
2000-09-24 14:04:58 +08:00
|
|
|
DBTzero( &data );
|
2000-09-25 06:48:13 +08:00
|
|
|
data.data = id;
|
|
|
|
data.ulen = sizeof(ID);
|
2000-09-24 14:04:58 +08:00
|
|
|
data.flags = DB_DBT_USERMEM;
|
|
|
|
|
2000-09-25 06:48:13 +08:00
|
|
|
/* fetch it */
|
2001-11-28 11:11:04 +08:00
|
|
|
rc = db->get( db, txn, &key, &data, bdb->bi_db_opflags );
|
2000-09-24 14:04:58 +08:00
|
|
|
|
2000-09-28 10:42:20 +08:00
|
|
|
if( rc != 0 ) {
|
|
|
|
Debug( LDAP_DEBUG_TRACE, "<= bdb_dn2id: get failed: %s (%d)\n",
|
|
|
|
db_strerror( rc ), rc, 0 );
|
|
|
|
} else {
|
|
|
|
Debug( LDAP_DEBUG_TRACE, "<= bdb_dn2id: got id=0x%08lx\n",
|
|
|
|
*id, 0, 0 );
|
|
|
|
}
|
2000-09-24 14:04:58 +08:00
|
|
|
|
2000-09-25 06:48:13 +08:00
|
|
|
ch_free( key.data );
|
2000-09-24 07:15:40 +08:00
|
|
|
return rc;
|
2000-09-20 15:21:09 +08:00
|
|
|
}
|
|
|
|
|
2000-09-25 06:48:13 +08:00
|
|
|
int
|
|
|
|
bdb_dn2id_matched(
|
2000-09-28 06:28:59 +08:00
|
|
|
BackendDB *be,
|
2000-09-25 06:48:13 +08:00
|
|
|
DB_TXN *txn,
|
2000-09-28 06:28:59 +08:00
|
|
|
const char *in,
|
2000-09-25 06:48:13 +08:00
|
|
|
ID *id,
|
|
|
|
char **matchedDN )
|
2000-09-20 15:21:09 +08:00
|
|
|
{
|
2000-09-25 06:48:13 +08:00
|
|
|
int rc;
|
|
|
|
DBT key, data;
|
|
|
|
struct bdb_info *bdb = (struct bdb_info *) be->be_private;
|
|
|
|
DB *db = bdb->bi_dn2id->bdi_db;
|
|
|
|
const char *dn = in;
|
|
|
|
char *tmp = NULL;
|
2000-09-20 15:21:09 +08:00
|
|
|
|
2000-09-25 06:48:13 +08:00
|
|
|
Debug( LDAP_DEBUG_TRACE, "=> bdb_dn2id_matched( \"%s\" )\n", dn, 0, 0 );
|
2000-09-20 15:21:09 +08:00
|
|
|
|
2000-09-25 06:48:13 +08:00
|
|
|
DBTzero( &key );
|
|
|
|
key.size = strlen( dn ) + 2;
|
|
|
|
key.data = ch_malloc( key.size );
|
|
|
|
((char *)key.data)[0] = DN_BASE_PREFIX;
|
2000-09-20 15:21:09 +08:00
|
|
|
|
2000-09-25 06:48:13 +08:00
|
|
|
/* store the ID */
|
|
|
|
DBTzero( &data );
|
|
|
|
data.data = id;
|
|
|
|
data.ulen = sizeof(ID);
|
|
|
|
data.flags = DB_DBT_USERMEM;
|
2000-09-20 15:21:09 +08:00
|
|
|
|
2000-09-25 06:48:13 +08:00
|
|
|
*matchedDN = NULL;
|
2000-09-20 15:21:09 +08:00
|
|
|
|
2000-09-25 06:48:13 +08:00
|
|
|
while(1) {
|
|
|
|
AC_MEMCPY( &((char *)key.data)[1], dn, key.size - 1 );
|
2000-09-20 15:21:09 +08:00
|
|
|
|
2000-09-27 03:26:08 +08:00
|
|
|
*id = NOID;
|
|
|
|
|
2000-09-25 06:48:13 +08:00
|
|
|
/* fetch it */
|
2001-11-28 11:11:04 +08:00
|
|
|
rc = db->get( db, txn, &key, &data, bdb->bi_db_opflags );
|
2000-09-20 15:21:09 +08:00
|
|
|
|
2000-09-25 06:48:13 +08:00
|
|
|
if( rc == DB_NOTFOUND ) {
|
|
|
|
char *pdn = dn_parent( be, dn );
|
|
|
|
ch_free( tmp );
|
|
|
|
tmp = NULL;
|
2000-09-20 15:21:09 +08:00
|
|
|
|
2000-09-25 06:48:13 +08:00
|
|
|
if( pdn == NULL || *pdn == '\0' ) {
|
2000-09-27 03:26:08 +08:00
|
|
|
Debug( LDAP_DEBUG_TRACE,
|
|
|
|
"<= bdb_dn2id_matched: no match\n",
|
|
|
|
0, 0, 0 );
|
2000-09-25 06:48:13 +08:00
|
|
|
ch_free( pdn );
|
|
|
|
break;
|
|
|
|
}
|
2000-09-20 15:21:09 +08:00
|
|
|
|
2000-09-25 06:48:13 +08:00
|
|
|
dn = pdn;
|
|
|
|
tmp = pdn;
|
|
|
|
key.size = strlen( dn ) + 2;
|
2000-09-20 15:21:09 +08:00
|
|
|
|
2000-09-25 06:48:13 +08:00
|
|
|
} else if ( rc == 0 ) {
|
2000-09-27 03:26:08 +08:00
|
|
|
if( data.size != sizeof( ID ) ) {
|
|
|
|
Debug( LDAP_DEBUG_ANY,
|
|
|
|
"<= bdb_dn2id_matched: get size mismatch: "
|
|
|
|
"expected %ld, got %ld\n",
|
|
|
|
(long) sizeof(ID), (long) data.size, 0 );
|
|
|
|
ch_free( tmp );
|
|
|
|
}
|
|
|
|
|
2000-09-25 06:48:13 +08:00
|
|
|
if( in != dn ) {
|
|
|
|
*matchedDN = (char *) dn;
|
|
|
|
}
|
2000-09-27 03:26:08 +08:00
|
|
|
|
2000-09-25 06:48:13 +08:00
|
|
|
Debug( LDAP_DEBUG_TRACE,
|
2000-09-28 08:02:47 +08:00
|
|
|
"<= bdb_dn2id_matched: id=0x%08lx: %s %s\n",
|
2001-10-14 00:55:54 +08:00
|
|
|
(long) *id, *matchedDN == NULL ? "entry" : "matched", dn );
|
2000-09-25 06:48:13 +08:00
|
|
|
break;
|
|
|
|
|
|
|
|
} else {
|
2000-09-27 03:26:08 +08:00
|
|
|
Debug( LDAP_DEBUG_ANY,
|
|
|
|
"<= bdb_dn2id_matched: get failed: %s (%d)\n",
|
|
|
|
db_strerror(rc), rc, 0 );
|
2000-09-25 06:48:13 +08:00
|
|
|
ch_free( tmp );
|
|
|
|
break;
|
|
|
|
}
|
2000-09-20 15:21:09 +08:00
|
|
|
}
|
|
|
|
|
2000-09-25 06:48:13 +08:00
|
|
|
ch_free( key.data );
|
|
|
|
return rc;
|
2000-09-20 15:21:09 +08:00
|
|
|
}
|
|
|
|
|
2000-09-25 06:48:13 +08:00
|
|
|
int
|
|
|
|
bdb_dn2id_children(
|
2000-09-28 06:28:59 +08:00
|
|
|
BackendDB *be,
|
2000-09-25 06:48:13 +08:00
|
|
|
DB_TXN *txn,
|
2000-09-28 06:28:59 +08:00
|
|
|
const char *dn )
|
2000-09-20 15:21:09 +08:00
|
|
|
{
|
2000-09-25 06:48:13 +08:00
|
|
|
int rc;
|
|
|
|
DBT key, data;
|
|
|
|
struct bdb_info *bdb = (struct bdb_info *) be->be_private;
|
|
|
|
DB *db = bdb->bi_dn2id->bdi_db;
|
2000-09-20 15:21:09 +08:00
|
|
|
ID id;
|
|
|
|
|
2000-09-25 06:48:13 +08:00
|
|
|
Debug( LDAP_DEBUG_TRACE, "=> bdb_dn2id_children( %s )\n",
|
|
|
|
dn, 0, 0 );
|
2000-09-20 15:21:09 +08:00
|
|
|
|
2000-09-25 06:48:13 +08:00
|
|
|
DBTzero( &key );
|
|
|
|
key.size = strlen( dn ) + 2;
|
|
|
|
key.data = ch_malloc( key.size );
|
|
|
|
((char *)key.data)[0] = DN_ONE_PREFIX;
|
|
|
|
AC_MEMCPY( &((char *)key.data)[1], dn, key.size - 1 );
|
2000-09-20 15:21:09 +08:00
|
|
|
|
2000-09-25 06:48:13 +08:00
|
|
|
/* we actually could do a empty get... */
|
|
|
|
DBTzero( &data );
|
|
|
|
data.data = &id;
|
|
|
|
data.ulen = sizeof(id);
|
|
|
|
data.flags = DB_DBT_USERMEM;
|
|
|
|
data.doff = 0;
|
|
|
|
data.dlen = sizeof(id);
|
2000-09-20 15:21:09 +08:00
|
|
|
|
2001-11-28 11:11:04 +08:00
|
|
|
rc = db->get( db, txn, &key, &data, bdb->bi_db_opflags );
|
2000-09-20 15:21:09 +08:00
|
|
|
|
2000-09-28 08:24:28 +08:00
|
|
|
Debug( LDAP_DEBUG_TRACE, "<= bdb_dn2id_children( %s ): %schildren (%d)\n",
|
2000-09-25 06:48:13 +08:00
|
|
|
dn,
|
2000-09-28 08:24:28 +08:00
|
|
|
rc == 0 ? "" : ( rc == DB_NOTFOUND ? "no " :
|
2000-09-25 06:48:13 +08:00
|
|
|
db_strerror(rc) ), rc );
|
2000-09-20 15:21:09 +08:00
|
|
|
|
2000-09-25 06:48:13 +08:00
|
|
|
return rc;
|
2000-09-20 15:21:09 +08:00
|
|
|
}
|
2001-06-15 15:08:37 +08:00
|
|
|
|
|
|
|
int
|
|
|
|
bdb_dn2idl(
|
|
|
|
BackendDB *be,
|
|
|
|
const char *dn,
|
|
|
|
int prefix,
|
|
|
|
ID *ids )
|
|
|
|
{
|
|
|
|
int rc;
|
|
|
|
DBT key, data;
|
|
|
|
struct bdb_info *bdb = (struct bdb_info *) be->be_private;
|
|
|
|
DB *db = bdb->bi_dn2id->bdi_db;
|
|
|
|
|
|
|
|
Debug( LDAP_DEBUG_TRACE, "=> bdb_dn2idl( \"%s\" )\n", dn, 0, 0 );
|
|
|
|
|
2001-12-03 22:04:06 +08:00
|
|
|
if (prefix == DN_SUBTREE_PREFIX && be_issuffix(be, dn))
|
|
|
|
{
|
|
|
|
BDB_IDL_ALL(bdb, ids);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2001-06-15 15:08:37 +08:00
|
|
|
DBTzero( &key );
|
|
|
|
key.size = strlen( dn ) + 2;
|
|
|
|
key.data = ch_malloc( key.size );
|
|
|
|
((char *)key.data)[0] = prefix;
|
|
|
|
AC_MEMCPY( &((char *)key.data)[1], dn, key.size - 1 );
|
|
|
|
|
2001-12-06 22:15:47 +08:00
|
|
|
rc = bdb_idl_fetch_key( be, db, NULL, &key, ids );
|
2001-06-15 15:08:37 +08:00
|
|
|
|
|
|
|
if( rc != 0 ) {
|
|
|
|
Debug( LDAP_DEBUG_TRACE,
|
|
|
|
"<= bdb_dn2idl: get failed: %s (%d)\n",
|
|
|
|
db_strerror( rc ), rc, 0 );
|
2001-10-14 00:55:54 +08:00
|
|
|
|
2001-06-15 15:08:37 +08:00
|
|
|
} else {
|
|
|
|
Debug( LDAP_DEBUG_TRACE,
|
|
|
|
"<= bdb_dn2idl: id=%ld first=%ld last=%ld\n",
|
2001-10-14 00:55:54 +08:00
|
|
|
(long) ids[0],
|
|
|
|
(long) BDB_IDL_FIRST( ids ), (long) BDB_IDL_LAST( ids ) );
|
2001-06-15 15:08:37 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
ch_free( key.data );
|
|
|
|
return rc;
|
|
|
|
}
|