b->a_group_oc, b->a_group_at);
if ( ndn.bv_val )
free( ndn.bv_val );
- if ( rc != 0 )
- {
+ if ( rc != 0 ) {
continue;
}
}
#include "back-bdb.h"
#include "proto-bdb.h"
-
/* return LDAP_SUCCESS IFF we can retrieve the attributes
* of entry with e_ndn
*/
BerVarray *vals )
{
struct bdbinfo *li = (struct bdbinfo *) be->be_private;
+ struct bdb_op_info *boi = (struct bdb_op_info *) op->o_private;
+ DB_TXN *txn = NULL;
Entry *e;
int i, j, rc;
Attribute *attr;
target ? target->e_ndn : "", 0, 0 );
#endif
+ if( boi != NULL && be == boi->boi_bdb ) {
+ txn = boi->boi_txn;
+ }
+
if (target != NULL && dn_match(&target->e_nname, entry_ndn)) {
/* we already have a LOCKED copy of the entry */
e = target;
} else {
/* can we find entry */
- rc = bdb_dn2entry( be, NULL, entry_ndn, &e, NULL, 0 );
+ rc = bdb_dn2entry( be, txn, entry_ndn, &e, NULL, 0 );
switch( rc ) {
case DB_NOTFOUND:
case 0:
break;
default:
+ if( txn != NULL ) {
+ boi->boi_err = rc;
+ }
return LDAP_OTHER;
}
if (e == NULL) {
)
{
struct bdbinfo *li = (struct bdbinfo *) be->be_private;
+ struct bdb_op_info *boi = (struct bdb_op_info *) op->o_private;
+ DB_TXN *txn;
Entry *e;
int rc = 1;
Attribute *attr;
target->e_ndn, 0, 0 );
#endif
+ if( boi != NULL && be == boi->boi_bdb ) {
+ txn = boi->boi_txn;
+ }
+
if (dn_match(&target->e_name, gr_ndn)) {
/* we already have a LOCKED copy of the entry */
e = target;
#endif
} else {
/* can we find group entry */
- rc = bdb_dn2entry( be, NULL, gr_ndn, &e, NULL, 0 );
+ rc = bdb_dn2entry( be, txn, gr_ndn, &e, NULL, 0 );
if( rc ) {
+ if( txn ) {
+ boi->boi_err = rc;
+ }
return( 1 );
}
if (e == NULL) {
bi->bi_op_abandon = 0;
bi->bi_extended = bdb_extended;
- bi->bi_acl_group = bdb_group;
+#if 0
+ /*
+ * these routines (and their callers) are not yet designed
+ * to work with transaction. Using them may cause deadlock.
+ */
+ bi->bi_acl_group = bdb_group;
bi->bi_acl_attribute = bdb_attribute;
- bi->bi_chk_referrals = bdb_referrals;
+#else
+ bi->bi_acl_group = 0;
+ bi->bi_acl_attribute = 0;
+#endif
+ bi->bi_chk_referrals = bdb_referrals;
bi->bi_entry_release_rw = bdb_entry_release;
/*