From a8658a8163099bbe315bfc1ca718aecc2f77efa4 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Sat, 19 Jan 2002 04:51:42 +0000 Subject: [PATCH] Reset Entry->e_ocflags to 0 if objectClass attr is modified. (Only an issue with entry caching...) --- servers/slapd/back-bdb/modify.c | 5 +++++ servers/slapd/back-ldbm/modify.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/servers/slapd/back-bdb/modify.c b/servers/slapd/back-bdb/modify.c index 17acfbd736..5050bddda8 100644 --- a/servers/slapd/back-bdb/modify.c +++ b/servers/slapd/back-bdb/modify.c @@ -117,6 +117,11 @@ int bdb_modify_internal( return err; } + /* If objectClass was modified, reset the flags */ + if ( mod->sm_desc == slap_schema.si_ad_objectClass ) { + e->e_ocflags = 0; + } + /* check if modified attribute was indexed */ err = bdb_index_is_indexed( be, mod->sm_desc ); if ( err == LDAP_SUCCESS ) { diff --git a/servers/slapd/back-ldbm/modify.c b/servers/slapd/back-ldbm/modify.c index 685d87c6f5..8753991485 100644 --- a/servers/slapd/back-ldbm/modify.c +++ b/servers/slapd/back-ldbm/modify.c @@ -187,6 +187,11 @@ int ldbm_modify_internal( goto exit; } + /* If objectClass was modified, reset the flags */ + if ( mod->sm_desc == slap_schema.si_ad_objectClass ) { + e->e_ocflags = 0; + } + /* check if modified attribute was indexed */ rc = index_is_indexed( be, mod->sm_desc ); if ( rc == LDAP_SUCCESS ) {