pgreco / rpms / ipa

Forked from forks/areguera/rpms/ipa 4 years ago
Clone

Blame SOURCES/0048-trustdomain_find-make-sure-we-skip-short-entries-whe.patch

9991ea
From a11cfd34e2f92c3c71a0b568d758f7d5221b4e94 Mon Sep 17 00:00:00 2001
9991ea
From: Alexander Bokovoy <abokovoy@redhat.com>
9991ea
Date: Wed, 26 Feb 2014 17:59:05 +0200
9991ea
Subject: [PATCH 48/51] trustdomain_find: make sure we skip short entries when
9991ea
 --pkey-only is specified
9991ea
9991ea
With --pkey-only only primary key is returned. It makes no sense to check and
9991ea
replace boolean values then.
9991ea
9991ea
https://fedorahosted.org/freeipa/ticket/4196
9991ea
9991ea
Reviewed-By: Martin Kosek <mkosek@redhat.com>
9991ea
---
9991ea
 ipalib/plugins/trust.py | 2 ++
9991ea
 1 file changed, 2 insertions(+)
9991ea
9991ea
diff --git a/ipalib/plugins/trust.py b/ipalib/plugins/trust.py
9991ea
index 0b6db27c696cd169c8f4b33128520961c20e3015..bd71253607d6009414ff8a24b042175f0cb08d66 100644
9991ea
--- a/ipalib/plugins/trust.py
9991ea
+++ b/ipalib/plugins/trust.py
9991ea
@@ -1191,6 +1191,8 @@ def pre_callback(self, ldap, filters, attrs_list, base_dn, scope, *args, **optio
9991ea
         return (filters, base_dn, ldap.SCOPE_SUBTREE)
9991ea
 
9991ea
     def post_callback(self, ldap, entries, truncated, *args, **options):
9991ea
+        if options.get('pkey_only', False):
9991ea
+            return truncated
9991ea
         trust_dn = self.obj.get_dn(args[0], trust_type=u'ad')
9991ea
         trust_entry = ldap.get_entry(trust_dn)
9991ea
         for entry in entries:
9991ea
-- 
9991ea
1.8.5.3
9991ea