From a09c50671ecc53af63765afca13edd27ee598081 Mon Sep 17 00:00:00 2001 From: Jan Cholasta Date: Mon, 4 Feb 2013 09:47:00 +0100 Subject: Use full DNs in plugin code. --- ipalib/plugins/host.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ipalib/plugins/host.py') diff --git a/ipalib/plugins/host.py b/ipalib/plugins/host.py index affc3d77c..e798d23bf 100644 --- a/ipalib/plugins/host.py +++ b/ipalib/plugins/host.py @@ -334,8 +334,7 @@ class host(LDAPObject): try: (dn, entry_attrs) = self.backend.find_entry_by_attr( 'serverhostname', hostname, self.object_class, [''], - self.container_dn - ) + DN(self.container_dn, api.env.basedn)) except errors.NotFound: pass return dn @@ -347,8 +346,9 @@ class host(LDAPObject): managed_hosts = [] try: - (hosts, truncated) = ldap.find_entries(base_dn=self.container_dn, - filter=host_filter, attrs_list=host_attrs) + (hosts, truncated) = ldap.find_entries( + base_dn=DN(self.container_dn, api.env.basedn), + filter=host_filter, attrs_list=host_attrs) for host in hosts: managed_hosts.append(host[0]) -- cgit