int bdb_id2entry(
BackendDB *be,
DB_TXN *tid,
- u_int32_t locker,
+ BDB_LOCKER locker,
ID id,
Entry **e )
{
if ( rc ) return rc;
/* Use our own locker if needed */
- if ( !tid && locker )
- cursor->locker = locker;
+ if ( !tid && locker ) {
+ CURSOR_SETLOCKER( cursor, locker );
+ }
/* Get the nattrs / nvals counts first */
data.ulen = data.dlen = sizeof(buf);
data.data = buf;
rc = cursor->c_get( cursor, &key, &data, DB_SET );
- if ( rc ) goto leave;
+ if ( rc ) goto finish;
eh.bv.bv_val = buf;
eh.bv.bv_len = data.size;
rc = entry_header( &eh );
- if ( rc ) goto leave;
+ if ( rc ) goto finish;
/* Get the size */
data.flags ^= DB_DBT_PARTIAL;
data.ulen = 0;
rc = cursor->c_get( cursor, &key, &data, DB_CURRENT );
- if ( rc != DB_BUFFER_SMALL ) goto leave;
+ if ( rc != DB_BUFFER_SMALL ) goto finish;
/* Allocate a block and retrieve the data */
off = eh.data - eh.bv.bv_val;
rc = cursor->c_get( cursor, &key, &data, DB_CURRENT );
-leave:
+finish:
cursor->c_close( cursor );
if( rc != 0 ) {
int rc;
const char *at_name = at ? at->ad_cname.bv_val : "(null)";
- u_int32_t locker = 0;
+ BDB_LOCKER locker = 0;
DB_LOCK lock;
int free_lock_id = 0;
"=> bdb_entry_get: found entry: \"%s\"\n",
ndn->bv_val, 0, 0 );
- /* find attribute values */
- if( is_entry_alias( e ) ) {
- Debug( LDAP_DEBUG_ACL,
- "<= bdb_entry_get: entry is an alias\n", 0, 0, 0 );
- rc = LDAP_ALIAS_PROBLEM;
- goto return_results;
- }
-
- if( is_entry_referral( e ) ) {
- Debug( LDAP_DEBUG_ACL,
- "<= bdb_entry_get: entry is a referral\n", 0, 0, 0 );
- rc = LDAP_REFERRAL;
- goto return_results;
- }
-
if ( oc && !is_entry_objectclass( e, oc, 0 )) {
Debug( LDAP_DEBUG_ACL,
"<= bdb_entry_get: failed to find objectClass %s\n",