From 7aeae93c3487e2b1159c8786065d4f6960c5cd92 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Wed, 22 Feb 2012 15:53:12 -0500 Subject: Don't check for schema uniqueness when comparing in ldapupdate. This is needed on F-17+, otherwise things blow up when we try to see if we've added new schema. Introspection is required to see if the argument check_uniqueness is available. https://fedorahosted.org/freeipa/ticket/2383 --- ipaserver/install/ldapupdate.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ipaserver/install/ldapupdate.py b/ipaserver/install/ldapupdate.py index a2a94d31..90b3691a 100644 --- a/ipaserver/install/ldapupdate.py +++ b/ipaserver/install/ldapupdate.py @@ -43,6 +43,7 @@ import os import pwd import fnmatch import csv +import inspect from ipaserver.install.plugins import PRE_UPDATE, POST_UPDATE from ipaserver.install.plugins import FIRST, MIDDLE, LAST @@ -586,7 +587,11 @@ class LDAPUpdate: return True if the schema has changed return False if it has not """ - s = ldap.schema.SubSchema(s) + signature = inspect.getargspec(ldap.schema.SubSchema.__init__) + if 'check_uniqueness' in signature.args: + s = ldap.schema.SubSchema(s, check_uniqueness=0) + else: + s = ldap.schema.SubSchema(s) s = s.ldap_entry() # Get a fresh copy and convert into a SubSchema -- cgit