Hi,

while rebasing patches 126 & 127 on top of ipa-3-1, I have noticed that commit bceccbd6 uses new LDAP API, which is not available in 3.1. The attached patch fixes this.

Honza

--
Jan Cholasta
>From 19090a990a48934459ae66d7ce1443ce2c6fdbfd Mon Sep 17 00:00:00 2001
From: Jan Cholasta <[email protected]>
Date: Tue, 16 Apr 2013 09:45:34 +0200
Subject: [PATCH] Do not use new LDAP API in old code.

---
 ipaserver/install/adtrustinstance.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ipaserver/install/adtrustinstance.py b/ipaserver/install/adtrustinstance.py
index c174351..2c9c90c 100644
--- a/ipaserver/install/adtrustinstance.py
+++ b/ipaserver/install/adtrustinstance.py
@@ -630,13 +630,13 @@ class ADTRUSTInstance(service.Service):
         try:
             cifs_services = DN(api.env.container_service, self.suffix)
             # Search for cifs services which also belong to adtrust agents, these are our DCs
-            res = self.admin_conn.get_entries(cifs_services,
+            res = self.admin_conn.getList(cifs_services,
                 ldap.SCOPE_ONELEVEL,
                 "(&(krbprincipalname=cifs/*@%s)(memberof=%s))" % (self.realm, str(self.smb_dn)))
             if len(res) > 1:
                 # there are other CIFS services defined, we are not alone
                 for entry in res:
-                    managedBy = entry.single_value('managedBy', None)
+                    managedBy = entry.getValue('managedBy')
                     if managedBy:
                         fqdn = DN(managedBy)['fqdn']
                         if fqdn != unicode(self.fqdn):
-- 
1.8.1.4

_______________________________________________
Freeipa-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to