mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-28 01:41:14 -06:00
Don't assume that the Firefox autoconfig files exist.
These are created by an object-signing cert and needs to be done after the fact if a server is created with user-supplied PKCS#12 files. 452402
This commit is contained in:
parent
9f2ee29218
commit
cf06dd9f84
@ -131,14 +131,15 @@ def install_http(config):
|
||||
http.create_instance(config.realm_name, config.host_name, config.domain_name, False, pkcs12_info)
|
||||
|
||||
# Now copy the autoconfiguration files
|
||||
try:
|
||||
shutil.copy(config.dir + "/preferences.html", "/usr/share/ipa/html/preferences.html")
|
||||
shutil.copy(config.dir + "/configure.jar", "/usr/share/ipa/html/configure.jar")
|
||||
shutil.copy(config.dir + "/ca.crt", "/usr/share/ipa/html/ca.crt")
|
||||
os.chmod("/usr/share/ipa/html/ca.crt", 0444)
|
||||
except Exception, e:
|
||||
print "error copying files: " + str(e)
|
||||
sys.exit(1)
|
||||
if ipautil.file_exists(config.dir + "/preferences.html"):
|
||||
try:
|
||||
shutil.copy(config.dir + "/preferences.html", "/usr/share/ipa/html/preferences.html")
|
||||
shutil.copy(config.dir + "/configure.jar", "/usr/share/ipa/html/configure.jar")
|
||||
shutil.copy(config.dir + "/ca.crt", "/usr/share/ipa/html/ca.crt")
|
||||
os.chmod("/usr/share/ipa/html/ca.crt", 0444)
|
||||
except Exception, e:
|
||||
print "error copying files: " + str(e)
|
||||
sys.exit(1)
|
||||
|
||||
def check_dirsrv():
|
||||
serverids = dsinstance.check_existing_installation()
|
||||
|
@ -150,12 +150,14 @@ def save_config(dir, realm_name, host_name, ds_user, domain_name):
|
||||
|
||||
def copy_files(realm_name, dir):
|
||||
config_dir = dsinstance.config_dirname(dsinstance.realm_to_serverid(realm_name))
|
||||
|
||||
try:
|
||||
shutil.copy("/var/kerberos/krb5kdc/ldappwd", dir + "/ldappwd")
|
||||
shutil.copy("/var/kerberos/krb5kdc/kpasswd.keytab", dir + "/kpasswd.keytab")
|
||||
shutil.copy("/usr/share/ipa/html/preferences.html", dir + "/preferences.html")
|
||||
shutil.copy("/usr/share/ipa/html/configure.jar", dir + "/configure.jar")
|
||||
shutil.copy(config_dir + "/cacert.asc", dir + "/ca.crt")
|
||||
if ipautil.file_exists("/usr/share/ipa/html/preferences.html"):
|
||||
shutil.copy("/usr/share/ipa/html/preferences.html", dir + "/preferences.html")
|
||||
shutil.copy("/usr/share/ipa/html/configure.jar", dir + "/configure.jar")
|
||||
shutil.copy(config_dir + "/cacert.asc", dir + "/ca.crt")
|
||||
except Exception, e:
|
||||
print "error copying files: " + str(e)
|
||||
sys.exit(1)
|
||||
|
Loading…
Reference in New Issue
Block a user