|
|
e3ffab |
From b196396dad7ef31d98d2937f80b629ecf9489c38 Mon Sep 17 00:00:00 2001
|
|
|
e3ffab |
From: Petr Vobornik <pvoborni@redhat.com>
|
|
|
e3ffab |
Date: Mon, 12 Jan 2015 13:08:11 +0100
|
|
|
e3ffab |
Subject: [PATCH] migrate-ds: fix compat plugin check
|
|
|
e3ffab |
|
|
|
e3ffab |
After ACI refactoring, admin cannot read Schema Compatibility plugin configuration and therefore migrade-ds won't find if compat plugin is enabled.
|
|
|
e3ffab |
|
|
|
e3ffab |
Now the check si done by looking if cn=compat subtree is present.
|
|
|
e3ffab |
|
|
|
e3ffab |
https://fedorahosted.org/freeipa/ticket/4825
|
|
|
e3ffab |
|
|
|
e3ffab |
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
|
|
|
e3ffab |
---
|
|
|
e3ffab |
ipalib/plugins/migration.py | 7 ++-----
|
|
|
e3ffab |
1 file changed, 2 insertions(+), 5 deletions(-)
|
|
|
e3ffab |
|
|
|
e3ffab |
diff --git a/ipalib/plugins/migration.py b/ipalib/plugins/migration.py
|
|
|
e3ffab |
index fa3d512bf1434c7d349713f78c292b481021303a..cd1fa73f8f514fa5441bea482199291450c87008 100644
|
|
|
e3ffab |
--- a/ipalib/plugins/migration.py
|
|
|
e3ffab |
+++ b/ipalib/plugins/migration.py
|
|
|
e3ffab |
@@ -140,7 +140,6 @@ _dn_err_msg = _('Malformed DN')
|
|
|
e3ffab |
|
|
|
e3ffab |
_supported_schemas = (u'RFC2307bis', u'RFC2307')
|
|
|
e3ffab |
|
|
|
e3ffab |
-_compat_dn = DN(('cn', 'Schema Compatibility'), ('cn', 'plugins'), ('cn', 'config'))
|
|
|
e3ffab |
|
|
|
e3ffab |
def _pre_migrate_user(ldap, pkey, dn, entry_attrs, failed, config, ctx, **kwargs):
|
|
|
e3ffab |
assert isinstance(dn, DN)
|
|
|
e3ffab |
@@ -879,10 +878,8 @@ can use their Kerberos accounts.''')
|
|
|
e3ffab |
#check whether the compat plugin is enabled
|
|
|
e3ffab |
if not options.get('compat'):
|
|
|
e3ffab |
try:
|
|
|
e3ffab |
- check_compat = ldap.get_entry(_compat_dn)
|
|
|
e3ffab |
- if check_compat is not None and \
|
|
|
e3ffab |
- check_compat.get('nsslapd-pluginenabled', [''])[0].lower() == 'on':
|
|
|
e3ffab |
- return dict(result={}, failed={}, enabled=True, compat=False)
|
|
|
e3ffab |
+ ldap.get_entry(DN(('cn', 'compat'), (api.env.basedn)))
|
|
|
e3ffab |
+ return dict(result={}, failed={}, enabled=True, compat=False)
|
|
|
e3ffab |
except errors.NotFound:
|
|
|
e3ffab |
pass
|
|
|
e3ffab |
|
|
|
e3ffab |
--
|
|
|
e3ffab |
2.1.0
|
|
|
e3ffab |
|