pgreco / rpms / ipa

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

Blame SOURCES/0199-Fix-broken-trust-warnings.patch

aa60fb
From 9f131566a8218a082b59ec980e04f9193e9c85f7 Mon Sep 17 00:00:00 2001
aa60fb
From: Martin Basti <mbasti@redhat.com>
aa60fb
Date: Wed, 16 Mar 2016 13:41:51 +0100
aa60fb
Subject: [PATCH] Fix broken trust warnings
aa60fb
aa60fb
Warning should be shown only for parent entries of trust domain. Subdomains do not contain ipaNTSecurityIdentifier attribute at all.
aa60fb
aa60fb
https://fedorahosted.org/freeipa/ticket/5737
aa60fb
aa60fb
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
aa60fb
---
aa60fb
 ipalib/plugins/trust.py | 4 +++-
aa60fb
 1 file changed, 3 insertions(+), 1 deletion(-)
aa60fb
aa60fb
diff --git a/ipalib/plugins/trust.py b/ipalib/plugins/trust.py
aa60fb
index d451325e31e4e1d8d7223f009677bbcb002c65cb..4b3cb7aab665e5cd952704a58e4b58ea55ecab0a 100644
aa60fb
--- a/ipalib/plugins/trust.py
aa60fb
+++ b/ipalib/plugins/trust.py
aa60fb
@@ -565,7 +565,9 @@ class trust(LDAPObject):
aa60fb
 
aa60fb
         try:
aa60fb
             entries, truncated = ldap.find_entries(
aa60fb
-                base_dn=DN(self.container_dn, self.api.env.basedn),
aa60fb
+                base_dn=DN(self.api.env.container_adtrusts,
aa60fb
+                           self.api.env.basedn),
aa60fb
+                scope=ldap.SCOPE_ONELEVEL,
aa60fb
                 attrs_list=['cn'],
aa60fb
                 filter='(&(ipaNTTrustPartner=*)'
aa60fb
                        '(!(ipaNTSecurityIdentifier=*)))',
aa60fb
-- 
aa60fb
2.5.0
aa60fb