mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
migrate-ds: workaround to detect compat tree
Migrate-ds needs to check if compat tree is enabled before migrating users and groups. The check is doing a base search on cn=compat,$SUFFIX and considers the compat tree enabled when the entry exists. Due to a bug in slapi-nis, the base search may return NotFound even though the compat tree is enabled. The workaround is to perform a base search on cn=users,cn=compat,$SUFFIX instead. Fixes: https://pagure.io/freeipa/issue/8984 Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
parent
b18cd122fa
commit
2ba3028b96
@ -922,7 +922,8 @@ migration process might be incomplete\n''')
|
||||
# check whether the compat plugin is enabled
|
||||
if not options.get('compat'):
|
||||
try:
|
||||
ldap.get_entry(DN(('cn', 'compat'), (api.env.basedn)))
|
||||
ldap.get_entry(DN(('cn', 'users'), ('cn', 'compat'),
|
||||
(api.env.basedn)))
|
||||
return dict(result={}, failed={}, enabled=True, compat=False)
|
||||
except errors.NotFound:
|
||||
pass
|
||||
|
Loading…
Reference in New Issue
Block a user