summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomas Babej <tbabej@redhat.com>2015-08-05 17:31:47 +0200
committerTomas Babej <tbabej@redhat.com>2015-08-06 10:16:30 +0200
commit2812242df4fefcb6567dc3a117b5e55a3211de92 (patch)
treeeef7a5ade700d6b87a1429432d2211220e3f08d2
parentdc0745650a0172bb66350fb453ec4285e31a32ad (diff)
downloadfreeipa-2812242df4fefcb6567dc3a117b5e55a3211de92.tar.gz
freeipa-2812242df4fefcb6567dc3a117b5e55a3211de92.tar.xz
freeipa-2812242df4fefcb6567dc3a117b5e55a3211de92.zip
Fix incorrect type comparison in trust-fetch-domains
Value needs to be unpacked from the list and converted before comparison. https://fedorahosted.org/freeipa/ticket/5182 Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
-rw-r--r--ipalib/plugins/trust.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ipalib/plugins/trust.py b/ipalib/plugins/trust.py
index faa8186ba..35e75d8ed 100644
--- a/ipalib/plugins/trust.py
+++ b/ipalib/plugins/trust.py
@@ -1487,7 +1487,7 @@ class trust_fetch_domains(LDAPRetrieve):
result['truncated'] = False
# For one-way trust fetch over DBus. we don't get the list in this case.
- if trust['ipanttrustdirection'] & TRUST_BIDIRECTIONAL != TRUST_BIDIRECTIONAL:
+ if int(trust['ipanttrustdirection'][0]) != TRUST_BIDIRECTIONAL:
fetch_trusted_domains_over_dbus(self.api, self.log, keys[0])
result['summary'] = unicode(_('List of trust domains successfully refreshed. Use trustdomain-find command to list them.'))
return result