summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2012-02-15 09:42:59 -0500
committerMartin Kosek <mkosek@redhat.com>2012-02-15 17:31:40 +0100
commit3357fa3c41430b14713c60a13ad43afcea04dd7d (patch)
treef67f14dd662f196c08c33fffc40990a0ef60e5fd
parentf6f7475007f05e20483607030d114ecb726f497c (diff)
downloadfreeipa-3357fa3c41430b14713c60a13ad43afcea04dd7d.tar.gz
freeipa-3357fa3c41430b14713c60a13ad43afcea04dd7d.tar.xz
freeipa-3357fa3c41430b14713c60a13ad43afcea04dd7d.zip
Remove Apache ccache on upgrade.
Make this removal a common function that can be shared between installer and upgrade tool. https://fedorahosted.org/freeipa/ticket/2395
-rw-r--r--install/tools/ipa-upgradeconfig4
-rw-r--r--ipaserver/install/httpinstance.py3
2 files changed, 7 insertions, 0 deletions
diff --git a/install/tools/ipa-upgradeconfig b/install/tools/ipa-upgradeconfig
index 2a4b4e527..764b17c42 100644
--- a/install/tools/ipa-upgradeconfig
+++ b/install/tools/ipa-upgradeconfig
@@ -250,6 +250,10 @@ def main():
upgrade_pki()
update_dbmodules(krbctx.default_realm)
uninstall_ipa_kpasswd()
+
+ http = httpinstance.HTTPInstance()
+ http.remove_httpd_ccache()
+
try:
if __name__ == "__main__":
sys.exit(main())
diff --git a/ipaserver/install/httpinstance.py b/ipaserver/install/httpinstance.py
index 7fa19c108..a23204be0 100644
--- a/ipaserver/install/httpinstance.py
+++ b/ipaserver/install/httpinstance.py
@@ -84,6 +84,7 @@ class HTTPInstance(service.Service):
self.step("setting up browser autoconfig", self.__setup_autoconfig)
self.step("publish CA cert", self.__publish_ca_cert)
self.step("creating a keytab for httpd", self.__create_http_keytab)
+ self.step("clean up any existing httpd ccache", self.remove_httpd_ccache)
self.step("configuring SELinux for httpd", self.__selinux_config)
self.step("restarting httpd", self.__start)
self.step("configuring httpd to start on boot", self.__enable)
@@ -136,7 +137,9 @@ class HTTPInstance(service.Service):
pent = pwd.getpwnam("apache")
os.chown("/etc/httpd/conf/ipa.keytab", pent.pw_uid, pent.pw_gid)
+ def remove_httpd_ccache(self):
# Clean up existing ccache
+ pent = pwd.getpwnam("apache")
installutils.remove_file('/tmp/krb5cc_%d' % pent.pw_uid)
def __configure_http(self):