diff options
author | Ana Krivokapic <akrivoka@redhat.com> | 2013-10-25 12:41:25 +0200 |
---|---|---|
committer | Petr Viktorin <pviktori@redhat.com> | 2014-01-14 16:37:56 +0100 |
commit | 689382dc833e687d30349b10a8fd7dc740d54d08 (patch) | |
tree | eaae5f062c8fe9a961697bb34b3a829f7190413f /ipaserver/install/bindinstance.py | |
parent | 3e1386a57e915a71c87471ee65877f3ab01fc724 (diff) | |
download | freeipa-689382dc833e687d30349b10a8fd7dc740d54d08.tar.gz freeipa-689382dc833e687d30349b10a8fd7dc740d54d08.tar.xz freeipa-689382dc833e687d30349b10a8fd7dc740d54d08.zip |
Enable Retro Changelog and Content Synchronization DS plugins
Enable Retro Changelog and Content Synchronization DS plugins which are required
for SyncRepl support.
Create a working directory /var/named/ipa required by bind-dyndb-ldap v4+.
https://fedorahosted.org/freeipa/ticket/3967
Diffstat (limited to 'ipaserver/install/bindinstance.py')
-rw-r--r-- | ipaserver/install/bindinstance.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ipaserver/install/bindinstance.py b/ipaserver/install/bindinstance.py index 6d5a1d44d..4baeb4e07 100644 --- a/ipaserver/install/bindinstance.py +++ b/ipaserver/install/bindinstance.py @@ -22,6 +22,7 @@ import os import pwd import netaddr import re +import errno import ldap @@ -509,6 +510,16 @@ class BindInstance(service.Service): os.close(bind_fd) print "Sample zone file for bind has been created in "+bind_name + def create_dir(self, path, mode): + try: + os.makedirs(path, mode) + except OSError as e: + if e.errno != errno.EEXIST: + raise e + + pent = pwd.getpwnam(self.named_user or 'named') + os.chown(path, pent.pw_uid, pent.pw_gid) + def create_instance(self): try: @@ -519,6 +530,8 @@ class BindInstance(service.Service): # get a connection to the DS self.ldap_connect() + self.create_dir('/var/named/ipa', 0700) + if installutils.record_in_hosts(self.ip_address, self.fqdn) is None: installutils.add_record_to_hosts(self.ip_address, self.fqdn) |