diff options
author | Rob Crittenden <rcritten@redhat.com> | 2012-02-22 15:53:12 -0500 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2012-02-22 18:16:13 -0500 |
commit | 7aeae93c3487e2b1159c8786065d4f6960c5cd92 (patch) | |
tree | a1e8c286c6ed23b3cb957c0cc886ae9e15ca938b | |
parent | ecf544ea0b5e5f8cc8b1339268bb85da90a03f03 (diff) | |
download | freeipa-7aeae93c3487e2b1159c8786065d4f6960c5cd92.tar.gz freeipa-7aeae93c3487e2b1159c8786065d4f6960c5cd92.tar.xz freeipa-7aeae93c3487e2b1159c8786065d4f6960c5cd92.zip |
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
-rw-r--r-- | ipaserver/install/ldapupdate.py | 7 |
1 files changed, 6 insertions, 1 deletions
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 |