diff options
author | Simo Sorce <simo@redhat.com> | 2015-05-08 13:39:29 -0400 |
---|---|---|
committer | Jan Cholasta <jcholast@redhat.com> | 2015-10-15 14:24:33 +0200 |
commit | 463dda30679da9ac5eea5683984002989965e2a5 (patch) | |
tree | e1e6c421598e7586e47bb7d3377a19ae3f2d6d44 /ipaserver/install/installutils.py | |
parent | ba22999cefb57f344acdc63a553d569ab6249099 (diff) | |
download | freeipa-463dda30679da9ac5eea5683984002989965e2a5.tar.gz freeipa-463dda30679da9ac5eea5683984002989965e2a5.tar.xz freeipa-463dda30679da9ac5eea5683984002989965e2a5.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>
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
Diffstat (limited to 'ipaserver/install/installutils.py')
-rw-r--r-- | ipaserver/install/installutils.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ipaserver/install/installutils.py b/ipaserver/install/installutils.py index 58be9f233..ff7ac00e0 100644 --- a/ipaserver/install/installutils.py +++ b/ipaserver/install/installutils.py @@ -35,6 +35,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 from six.moves.configparser import SafeConfigParser, NoOptionError @@ -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()) |