mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Fix migration plugin compat check
Ticket #2274 implements a check for compat plugin and warns user if it is enabled. However, there are 2 issues connected with the plugin: 1) The check is performed against the remote (migrated) LDAP server and not the local LDAP server, which does not make much sense 2) When the compat plugin is missing in cn=plugins,cn=config, it raises an error and thus breaks the migration This patch fixes both issues. https://fedorahosted.org/freeipa/ticket/2508
This commit is contained in:
parent
8b2090fae6
commit
0cb9882be9
@ -670,9 +670,13 @@ can use their Kerberos accounts.''')
|
||||
|
||||
#check whether the compat plugin is enabled
|
||||
if not options.get('compat'):
|
||||
(dn,check_compat) = ds_ldap.get_entry(_compat_dn, normalize=False)
|
||||
if check_compat is not None and check_compat.get('nsslapd-pluginenabled', [''])[0].lower() == 'on':
|
||||
return dict(result={},failed={},enabled=True, compat=False)
|
||||
try:
|
||||
(dn,check_compat) = ldap.get_entry(_compat_dn, normalize=False)
|
||||
if check_compat is not None and \
|
||||
check_compat.get('nsslapd-pluginenabled', [''])[0].lower() == 'on':
|
||||
return dict(result={},failed={},enabled=True, compat=False)
|
||||
except errors.NotFound:
|
||||
pass
|
||||
|
||||
if not ds_base_dn:
|
||||
# retrieve base DN from remote LDAP server
|
||||
|
Loading…
Reference in New Issue
Block a user