mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-10-25 14:40:16 -05:00
install: create ff krb extension on every install, replica install and upgrade
We don't want to copy the extension from master to replica because the replica may use newer version of FreeIPA and therefore the extension code might be obsolete. Same reason for upgrades. https://fedorahosted.org/freeipa/ticket/4478 Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
This commit is contained in:
1 parent
388a6432ed
commit
4e6a3c69b0
3 files changed
+2
-19
No files matched your search
@@ -247,11 +247,6 @@ def install_http(config, auto_redirect):
|
||||
if ipautil.file_exists(config.dir + "/configure.jar"):
|
||||
shutil.copy(config.dir + "/configure.jar",
|
||||
paths.CONFIGURE_JAR)
|
||||
if ipautil.file_exists(config.dir + "/krb.js"):
|
||||
shutil.copy(config.dir + "/krb.js",
|
||||
paths.KRB_JS)
|
||||
shutil.copy(config.dir + "/kerberosauth.xpi",
|
||||
paths.KERBEROSAUTH_XPI)
|
||||
except Exception, e:
|
||||
print "error copying files: " + str(e)
|
||||
sys.exit(1)
|
||||
|
||||
@@ -347,22 +347,13 @@ class HTTPInstance(service.Service):
|
||||
root_logger.warning('Object-signing certificate was not found; '
|
||||
'therefore, configure.jar was not created.')
|
||||
|
||||
self.setup_firefox_extension(self.realm, self.domain, force=True)
|
||||
self.setup_firefox_extension(self.realm, self.domain)
|
||||
|
||||
def setup_firefox_extension(self, realm, domain, force=False):
|
||||
def setup_firefox_extension(self, realm, domain):
|
||||
"""Set up the signed browser configuration extension
|
||||
|
||||
If the extension is already set up, skip the installation unless
|
||||
``force`` is true.
|
||||
"""
|
||||
|
||||
target_fname = paths.KRB_JS
|
||||
if os.path.exists(target_fname) and not force:
|
||||
root_logger.info(
|
||||
'%s exists, skipping install of Firefox extension',
|
||||
target_fname)
|
||||
return
|
||||
|
||||
sub_dict = dict(REALM=realm, DOMAIN=domain)
|
||||
db = certs.CertDB(realm)
|
||||
with open(db.passwd_fname) as pwdfile:
|
||||
|
||||
@@ -370,9 +370,6 @@ class ReplicaPrepare(admintool.AdminTool):
|
||||
preferences_filename = paths.PREFERENCES_HTML
|
||||
if ipautil.file_exists(preferences_filename):
|
||||
self.copy_info_file(preferences_filename, "preferences.html")
|
||||
self.copy_info_file(paths.KRB_JS, "krb.js")
|
||||
self.copy_info_file(
|
||||
paths.KERBEROSAUTH_XPI, "kerberosauth.xpi")
|
||||
jar_filename = paths.CONFIGURE_JAR
|
||||
if ipautil.file_exists(jar_filename):
|
||||
self.copy_info_file(jar_filename, "configure.jar")
|
||||
|
||||
Reference in new issue
Block a user