summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorence Blanc-Renaud <flo@redhat.com>2017-04-20 16:31:53 +0200
committerMartin Basti <mbasti@redhat.com>2017-04-24 12:51:37 +0200
commit434d9e539d24fe0110c5d6bf4a4342daf40d15d5 (patch)
tree108b505392eaaea66ec29e6491c3cbd7f9174bb1
parentb38750eaa82025aad56f8eca849f47775b2cbc75 (diff)
downloadfreeipa-434d9e539d24fe0110c5d6bf4a4342daf40d15d5.tar.gz
freeipa-434d9e539d24fe0110c5d6bf4a4342daf40d15d5.tar.xz
freeipa-434d9e539d24fe0110c5d6bf4a4342daf40d15d5.zip
upgrade: adtrust update_tdo_gidnumber plugin must check if adtrust is installed
During upgrade, the plugin update_tdo_gidnumber is launched in order to add a gidnumber to the Trusted Domain Object. This plugin should not be run when ad trust is not installed, otherwise an error message is displayed. https://pagure.io/freeipa/issue/6881 Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
-rw-r--r--ipaserver/install/plugins/adtrust.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/ipaserver/install/plugins/adtrust.py b/ipaserver/install/plugins/adtrust.py
index 075f19778..a72af0063 100644
--- a/ipaserver/install/plugins/adtrust.py
+++ b/ipaserver/install/plugins/adtrust.py
@@ -329,6 +329,11 @@ class update_tdo_gidnumber(Updater):
def execute(self, **options):
ldap = self.api.Backend.ldap2
+ # First, see if trusts are enabled on the server
+ if not self.api.Command.adtrust_is_enabled()['result']:
+ self.log.debug('AD Trusts are not enabled on this server')
+ return False, []
+
# Read the gidnumber of the fallback group
dn = DN(('cn', ADTRUSTInstance.FALLBACK_GROUP_NAME),
self.api.env.container_group,