Browse Source

Ticket 47973 - custom schema is registered in small caps after schema reload

Description: The fix for ticket 47973 [1] brougt an side effect which
lowers the case of the reloaded new schema.  This patch fixes the issue
by eliminating normalize_oc_nolock().

Note that the normalization is not needed since all the checks are done
by strcasecmp.  There is an exception.  When trying to replace a schema
with the same one having the different cases, exact string compare is
called.

[1] commit e0c78e1c1db351ea5cf835cdb55437b1ea26a3a6

https://fedorahosted.org/389/ticket/47973

Reviewed by [email protected] (Thanks, Thierry!!)
Noriko Hosoi 8 years ago
parent
commit
a0545ed399
1 changed files with 9 additions and 2 deletions
  1. 9 2
      ldap/servers/slapd/schema.c

+ 9 - 2
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))
     if (rc && !(schema_flags & DSE_SCHEMA_NO_BACKEND))
     {
     {
-        /* make sure the schema is normalized */
         if (schema_flags & DSE_SCHEMA_LOCKED) {
         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 {
         } else {
+            /* make sure the schema is normalized */
             normalize_oc();
             normalize_oc();
         }
         }