summaryrefslogtreecommitdiffstats
path: root/ipa-server/ipaserver/krbinstance.py
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2007-08-01 15:58:52 -0400
committerSimo Sorce <ssorce@redhat.com>2007-08-01 15:58:52 -0400
commitfbfee8231722f0f3168dcfa3da2b804ca7c6a5e2 (patch)
treef14bba0066a9b63e3cd01e7cbecaa99c88dfc6f9 /ipa-server/ipaserver/krbinstance.py
parent96d292b7351bd7db0d402e3a393386889e3d79d8 (diff)
downloadfreeipa.git-fbfee8231722f0f3168dcfa3da2b804ca7c6a5e2.tar.gz
freeipa.git-fbfee8231722f0f3168dcfa3da2b804ca7c6a5e2.tar.xz
freeipa.git-fbfee8231722f0f3168dcfa3da2b804ca7c6a5e2.zip
Try to fix dir layout and recover missing files
Diffstat (limited to 'ipa-server/ipaserver/krbinstance.py')
-rw-r--r--ipa-server/ipaserver/krbinstance.py26
1 files changed, 10 insertions, 16 deletions
diff --git a/ipa-server/ipaserver/krbinstance.py b/ipa-server/ipaserver/krbinstance.py
index 131eee35..5a43617b 100644
--- a/ipa-server/ipaserver/krbinstance.py
+++ b/ipa-server/ipaserver/krbinstance.py
@@ -28,13 +28,7 @@ from time import gmtime
import os
import pwd
import socket
-
-SHARE_DIR = "/usr/share/ipa/"
-
-def realm_to_suffix(realm_name):
- s = realm_name.split(".")
- terms = ["dc=" + x.lower() for x in s]
- return ",".join(terms)
+from util import *
def host_to_domain(fqdn):
s = fqdn.split(".")
@@ -149,15 +143,15 @@ class KrbInstance:
# TODO: NOT called yet, need to find out how to make sure the plugin is available first
def __add_pwd_extop_module(self):
- #add the password extop module
- extop_txt = template_file(SHARE_DIR + "ipapwd_extop_plugin.ldif", self.sub_dict)
- extop_fd = write_tmp_file(extop_txt)
- ldap_mod(extop_fd, "cn=Directory Manager", self.admin_password)
- extop_fd.close()
-
- #add an ACL to let the DS user read the master key
- args = ["/usr/bin/setfacl", "-m", "u:"+self.ds_user+":r", "/var/kerberos/krb5kdc/.k5."+self.realm]
- run(args)
+ #add the password extop module
+ extop_txt = template_file(SHARE_DIR + "ipapwd_extop_plugin.ldif", self.sub_dict)
+ extop_fd = write_tmp_file(extop_txt)
+ ldap_mod(extop_fd, "cn=Directory Manager", self.admin_password)
+ extop_fd.close()
+
+ #add an ACL to let the DS user read the master key
+ args = ["/usr/bin/setfacl", "-m", "u:"+self.ds_user+":r", "/var/kerberos/krb5kdc/.k5."+self.realm]
+ run(args)
def __create_sample_bind_zone(self):
bind_txt = template_file(SHARE_DIR + "bind.zone.db.template", self.sub_dict)