Create kadm5.acl if it doesn't exist

kadmind doesn't start without it, and Debian doesn't ship it by default.

Fixes: https://pagure.io/freeipa/issue/7553
Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
Reviewed-By: Christian Heimes <cheimes@redhat.com>
This commit is contained in:
Timo Aaltonen 2018-05-21 13:24:03 +03:00 committed by Christian Heimes
parent 172df673dd
commit 0030118ddc

View File

@ -299,6 +299,11 @@ class KrbInstance(service.Service):
logger.debug("Persistent keyring CCACHE is not enabled")
self.sub_dict['OTHER_LIBDEFAULTS'] = ''
# Create kadm5.acl if it doesn't exist
if not os.path.exists(paths.KRB5KDC_KADM5_ACL):
open(paths.KRB5KDC_KADM5_ACL, 'a').close()
os.chmod(paths.KRB5KDC_KADM5_ACL, 0o600)
def __add_krb_container(self):
self._ldap_mod("kerberos.ldif", self.sub_dict)