Enable importing LDIF files not shipped by IPA

This is to be able to import ACME schema provided by dogtag.

https://pagure.io/freeipa/issue/8524

Signed-off-by: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Fraser Tweedale <ftweedal@redhat.com>
Reviewed-By: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Mohammad Rizwan <myusuf@redhat.com>
This commit is contained in:
Rob Crittenden 2020-10-02 15:06:58 -04:00
parent 686414d201
commit 2ef53196c6
2 changed files with 4 additions and 1 deletions

View File

@ -347,7 +347,10 @@ class Service:
ldap_uri=None, dm_password=None):
pw_name = None
fd = None
path = os.path.join(paths.USR_SHARE_IPA_DIR, ldif)
if not os.path.isabs(ldif):
path = os.path.join(paths.USR_SHARE_IPA_DIR, ldif)
else:
path = ldif
nologlist = []
if sub_dict is not None: