From 3831d982375ef8553c3f991a10165d0b260e3ba5 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Tue, 7 May 2002 22:35:01 +0000 Subject: [PATCH] Turn these functions on again. Need backend_attribute for SASLauthz stuff. Fix to work with NULL op. --- servers/slapd/back-bdb/attribute.c | 3 ++- servers/slapd/back-bdb/group.c | 3 ++- servers/slapd/back-bdb/init.c | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/servers/slapd/back-bdb/attribute.c b/servers/slapd/back-bdb/attribute.c index d9dccddab9..38203b994d 100644 --- a/servers/slapd/back-bdb/attribute.c +++ b/servers/slapd/back-bdb/attribute.c @@ -30,7 +30,7 @@ bdb_attribute( BerVarray *vals ) { struct bdb_info *bdb = (struct bdb_info *) be->be_private; - struct bdb_op_info *boi = (struct bdb_op_info *) op->o_private; + struct bdb_op_info *boi = NULL; DB_TXN *txn = NULL; Entry *e; int i, j = 0, rc; @@ -60,6 +60,7 @@ bdb_attribute( target ? target->e_ndn : "", 0, 0 ); #endif + if( op ) boi = (struct bdb_op_info *) op->o_private; if( boi != NULL && be == boi->boi_bdb ) { txn = boi->boi_txn; } diff --git a/servers/slapd/back-bdb/group.c b/servers/slapd/back-bdb/group.c index 70d1523be9..2000de5209 100644 --- a/servers/slapd/back-bdb/group.c +++ b/servers/slapd/back-bdb/group.c @@ -34,7 +34,7 @@ bdb_group( ) { struct bdb_info *bdb = (struct bdb_info *) be->be_private; - struct bdb_op_info *boi = (struct bdb_op_info *) op->o_private; + struct bdb_op_info *boi = NULL; DB_TXN *txn = NULL; Entry *e; int rc = 1; @@ -71,6 +71,7 @@ bdb_group( target->e_ndn, 0, 0 ); #endif + if( op ) boi = (struct bdb_op_info *) op->o_private; if( boi != NULL && be == boi->boi_bdb ) { txn = boi->boi_txn; } diff --git a/servers/slapd/back-bdb/init.c b/servers/slapd/back-bdb/init.c index 0a366fd2b7..8563b3ee83 100644 --- a/servers/slapd/back-bdb/init.c +++ b/servers/slapd/back-bdb/init.c @@ -561,7 +561,7 @@ bdb_initialize( bi->bi_extended = bdb_extended; -#if 0 +#if 1 /* * these routines (and their callers) are not yet designed * to work with transaction. Using them may cause deadlock. -- 2.39.5