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
commit7688bbcc33eb24a86ede7dc12ea9c64a27006aa8 (patch)
treeef604c7759021504a94f02f2987abc8336b00b0b
parente28a45072004d93ced9bf81b3810fbd2652664b5 (diff)
downloadfreeipa-7688bbcc33eb24a86ede7dc12ea9c64a27006aa8.tar.gz
freeipa-7688bbcc33eb24a86ede7dc12ea9c64a27006aa8.tar.xz
freeipa-7688bbcc33eb24a86ede7dc12ea9c64a27006aa8.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 91ffaf7fe..940e06a5f 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