From 689382dc833e687d30349b10a8fd7dc740d54d08 Mon Sep 17 00:00:00 2001 From: Ana Krivokapic Date: Fri, 25 Oct 2013 12:41:25 +0200 Subject: 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 --- ipaserver/install/bindinstance.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'ipaserver') diff --git a/ipaserver/install/bindinstance.py b/ipaserver/install/bindinstance.py index 6d5a1d44..4baeb4e0 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) -- cgit