From 11cbfb591e86168c1835bd1607333ecf348e973f Mon Sep 17 00:00:00 2001 From: Thierry Bordaz Date: Mon, 21 Oct 2019 10:44:08 +0200 Subject: [PATCH] Ticket 50652: Allow installation of instances with completely different schema Bug Description: We need to address several issue 1 - attributes with different MR/Syntax 2 - attributes with different name but with same OID 3 - attributes with different definition but the same OID 4 - attribute with different value number Fix Description: problem 1 can be overwritten in 99user.ldif problem 2 can be address adding the new name in the alias definition problem 4 may not be addressed if moving an attribute to single-value ('cn' is used in config and needs to be multivalued) The fix is a tentative fix for 3. It allows to overwite a definition even if OID is already defined https://pagure.io/389-ds-base/issue/50652 Reviewed by: ? Platforms tested: F29 Flag Day: no Doc impact: no --- ldap/servers/slapd/attrsyntax.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ldap/servers/slapd/attrsyntax.c b/ldap/servers/slapd/attrsyntax.c index 8d218d4a3..431ffa147 100644 --- a/ldap/servers/slapd/attrsyntax.c +++ b/ldap/servers/slapd/attrsyntax.c @@ -964,7 +964,7 @@ attr_syntax_add(struct asyntaxinfo *asip, PRUint32 schema_flags) } /* Flag for deletion. We are going to override this attr */ attr_syntax_delete(oldas_from_name, schema_flags); - } else if (NULL != oldas_from_oid) { + } else if (0 == (asip->asi_flags & SLAPI_ATTR_FLAG_OVERRIDE) || NULL != oldas_from_oid) { /* failure - OID is in use but name does not exist */ rc = LDAP_TYPE_OR_VALUE_EXISTS; goto cleanup_and_return; -- 2.20.1