Skip to content

Commit

Permalink
upgrade: adtrust update_tdo_gidnumber plugin must check if adtrust is…
Browse files Browse the repository at this point in the history
… 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>
  • Loading branch information
flo-renaud authored and MartinBasti committed Apr 24, 2017
1 parent e3f2878 commit c05bd60
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ipaserver/install/plugins/adtrust.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit c05bd60

Please sign in to comment.