summaryrefslogtreecommitdiffstats
path: root/ipaserver/install/installutils.py
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2015-05-08 13:39:29 -0400
committerSimo Sorce <simo@redhat.com>2015-10-01 16:20:48 -0400
commit4265c7e8759482b82ce60642e51a9d0c45867848 (patch)
tree1c44443b10b77857b99140c624071e957cad52bb /ipaserver/install/installutils.py
parente3cb6305cc39caf8323ed0d1b729369910c97505 (diff)
downloadfreeipa-4265c7e8759482b82ce60642e51a9d0c45867848.tar.gz
freeipa-4265c7e8759482b82ce60642e51a9d0c45867848.tar.xz
freeipa-4265c7e8759482b82ce60642e51a9d0c45867848.zip
Add ipa-custodia service
Add a customized Custodia daemon and enable it after installation. Generates server keys and loads them in LDAP autonomously on install or update. Provides client code classes too. Signed-off-by: Simo Sorce <simo@redhat.com>
Diffstat (limited to 'ipaserver/install/installutils.py')
-rw-r--r--ipaserver/install/installutils.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/ipaserver/install/installutils.py b/ipaserver/install/installutils.py
index ad79f8896..acf309e78 100644
--- a/ipaserver/install/installutils.py
+++ b/ipaserver/install/installutils.py
@@ -36,6 +36,7 @@ from contextlib import contextmanager
from dns import resolver, rdatatype
from dns.exception import DNSException
import ldap
+import ldapurl
from nss.error import NSPRError
import six
@@ -1097,6 +1098,13 @@ def check_version():
def realm_to_serverid(realm_name):
return "-".join(realm_name.split("."))
+
+def realm_to_ldapi_uri(realm_name):
+ serverid = realm_to_serverid(realm_name)
+ socketname = paths.SLAPD_INSTANCE_SOCKET_TEMPLATE % (serverid,)
+ return 'ldapi://' + ldapurl.ldapUrlEscape(socketname)
+
+
def enable_and_start_oddjobd(sstore):
oddjobd = services.service('oddjobd')
sstore.backup_state('oddjobd', 'running', oddjobd.is_running())