ldap/servers/slapd/schema.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
New commits:
commit 28309c30fa5f0cbba7254bbb279278b18bc69b03
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Thu Jan 19 17:34:50 2017 -0800
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
diff --git a/ldap/servers/slapd/schema.c b/ldap/servers/slapd/schema.c
index 4b8910d..df4a71d 100644
--- a/ldap/servers/slapd/schema.c
+++ b/ldap/servers/slapd/schema.c
@@ -5386,11 +5386,19 @@ 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();
- else
+ if (schema_flags & DSE_SCHEMA_LOCKED) {
+ /*
+ * 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();
+ }
/* register callbacks */
dse_register_callback(*local_pschemadse, SLAPI_OPERATION_SEARCH,
Show replies by date