summaryrefslogtreecommitdiffstats
path: root/ipaserver/install/dsinstance.py
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2010-08-31 17:21:25 -0400
committerRob Crittenden <rcritten@redhat.com>2010-09-09 16:38:52 -0400
commitf87bd57c1d3a86ade7419ea17ddee65bacda4b7f (patch)
tree89c99bbb28e2c1965a5f58190065a2f45ae87dbf /ipaserver/install/dsinstance.py
parent2e8bae590eae495628ffb709540f7e83eee52ba2 (diff)
downloadfreeipa-f87bd57c1d3a86ade7419ea17ddee65bacda4b7f.tar.gz
freeipa-f87bd57c1d3a86ade7419ea17ddee65bacda4b7f.tar.xz
freeipa-f87bd57c1d3a86ade7419ea17ddee65bacda4b7f.zip
Fix certmonger errors when doing a client or server uninstall.
This started with the client uninstaller returning a 1 when not installed. There was no way to tell whether the uninstall failed or the client simply wasn't installed which caused no end of grief with the installer. This led to a lot of certmonger failures too, either trying to stop tracking a non-existent cert or not handling an existing tracked certificate. I moved the certmonger code out of the installer and put it into the client/server shared ipapython lib. It now tries a lot harder and smarter to untrack a certificate. ticket 142
Diffstat (limited to 'ipaserver/install/dsinstance.py')
-rw-r--r--ipaserver/install/dsinstance.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/ipaserver/install/dsinstance.py b/ipaserver/install/dsinstance.py
index a53348456..4a36f1b98 100644
--- a/ipaserver/install/dsinstance.py
+++ b/ipaserver/install/dsinstance.py
@@ -493,7 +493,9 @@ class DsInstance(service.Service):
serverid = self.restore_state("serverid")
if not serverid is None:
- dirname = config_dirname(serverid)
+ # drop the trailing / off the config_dirname so the directory
+ # will match what is in certmonger
+ dirname = config_dirname(serverid)[:-1]
dsdb = certs.CertDB(dirname)
dsdb.untrack_server_cert("Server-Cert")
erase_ds_instance_data(serverid)