summaryrefslogtreecommitdiffstats
path: root/ipaserver/install/dsinstance.py
diff options
context:
space:
mode:
authorAna Krivokapic <akrivoka@redhat.com>2013-07-29 18:33:09 +0200
committerMartin Kosek <mkosek@redhat.com>2013-08-08 16:52:48 +0200
commitda2605c942b6119b69e14ab5bec53ddda4393808 (patch)
tree0e916ccbd8cece29533aaa0a9b87a6d6eca5c435 /ipaserver/install/dsinstance.py
parentf988e422eb59c2617489d4129522f4d7f2b6af56 (diff)
downloadfreeipa-da2605c942b6119b69e14ab5bec53ddda4393808.tar.gz
freeipa-da2605c942b6119b69e14ab5bec53ddda4393808.tar.xz
freeipa-da2605c942b6119b69e14ab5bec53ddda4393808.zip
Handle --subject option in ipa-server-install
Properly handle --subject option of ipa-server-install, making sure this value gets passed to certmap.conf. Introduce a new template variable $SUBJECT_BASE for this purpose. Also make sure that this value is preserved on upgrades. https://fedorahosted.org/freeipa/ticket/3783
Diffstat (limited to 'ipaserver/install/dsinstance.py')
-rw-r--r--ipaserver/install/dsinstance.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/ipaserver/install/dsinstance.py b/ipaserver/install/dsinstance.py
index e48ced4b8..881575729 100644
--- a/ipaserver/install/dsinstance.py
+++ b/ipaserver/install/dsinstance.py
@@ -37,6 +37,7 @@ import certs
import ldap
from ipaserver.install import ldapupdate
from ipaserver.install import replication
+from ipaserver.install import sysupgrade
from ipalib import errors
from ipapython.dn import DN
@@ -653,7 +654,12 @@ class DsInstance(service.Service):
shutil.copyfile(ipautil.SHARE_DIR + "certmap.conf.template",
config_dirname(self.serverid) + "certmap.conf")
installutils.update_file(config_dirname(self.serverid) + "certmap.conf",
- '$REALM', self.realm_name)
+ '$SUBJECT_BASE', str(self.subject_base))
+ sysupgrade.set_upgrade_state(
+ 'certmap.conf',
+ 'subject_base',
+ str(self.subject_base)
+ )
def __enable_ldapi(self):
self._ldap_mod("ldapi.ldif", self.sub_dict)