]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-bdb/group.c
Reset Entry->e_ocflags to 0 if objectClass attr is modified.
[openldap] / servers / slapd / back-bdb / group.c
index 9bd50a3a10816f5a04fe9d309348a37619852928..c108c8c546a321a88a3ce5283c4d6af40efb1060 100644 (file)
@@ -34,6 +34,8 @@ bdb_group(
 )
 {
        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;
@@ -69,6 +71,10 @@ bdb_group(
                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;
@@ -82,8 +88,11 @@ bdb_group(
 #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) {
@@ -136,7 +145,7 @@ bdb_group(
                goto return_results;
        }
 
-       if( !is_entry_objectclass( e, group_oc ) ) {
+       if( !is_entry_objectclass( e, group_oc, 0 ) ) {
 #ifdef NEW_LOGGING
                LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
                        "bdb_group: failed to find %s in objectClass.\n",