#49093 Need investigation on the necessity of normalize_oc* calls in schema.c
Opened 2 years ago by nhosoi. Modified 4 months ago

Note: found in debugging/testing ticket 47973.

To avoid the unexpected case change, this normalize_oc_nolock is eliminated for the schema-reload path. The ordinary "else" case needs to be investigated which may be called unnecessarily.

diff --git a/ldap/servers/slapd/schema.c b/ldap/servers/slapd/schema.c
index c65cdba..392c01f 100644
--- a/ldap/servers/slapd/schema.c
+++ b/ldap/servers/slapd/schema.c
@@ -5377,10 +5377,17 @@ init_schema_dse_ext(char *schemadir, Slapi_Backend *be,

     if (rc && !(schema_flags & DSE_SCHEMA_NO_BACKEND))
     {
-        /* make sure the schema is normalized */
         if (schema_flags & DSE_SCHEMA_LOCKED) {
-            normalize_oc_nolock();
+            /* 
+             * Code path for schema reload.
+             * To fix the side effect which lowers the case of the
+             * reloaded new schema, eliminating normalize_oc_nolock().
+             * Note that the normalization is not needed since all
+             * the checks are done by strcasecmp.
+             */
+            ;
         } else {
+            /* make sure the schema is normalized */
             normalize_oc();
         }

Metadata Update from @nhosoi:
- Issue set to the milestone: 1.3.6.0

2 years ago

Metadata Update from @mreynolds:
- Issue close_status updated to: None
- Issue set to the milestone: 1.3.7.0 (was: 1.3.6.0)

2 years ago

Metadata Update from @mreynolds:
- Custom field reviewstatus adjusted to None
- Issue set to the milestone: 1.4.2 (was: 1.3.7.0)

4 months ago

Login to comment on this ticket.

Metadata