From fc8ac693726ec33b5c0924f9b8ff5d663705a5a3 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Fri, 5 Dec 2008 15:31:18 -0500 Subject: Port plugins to use the new output_for_cli() argument list Fix some errors uncovered by the nosetests --- ipa_server/plugins/b_ldap.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'ipa_server/plugins/b_ldap.py') diff --git a/ipa_server/plugins/b_ldap.py b/ipa_server/plugins/b_ldap.py index 862de1d8..8042474f 100644 --- a/ipa_server/plugins/b_ldap.py +++ b/ipa_server/plugins/b_ldap.py @@ -267,12 +267,15 @@ class ldap(CrudBackend): objectclass = kw.get('objectclass') sfilter = kw.get('filter') attributes = kw.get('attributes') + base = kw.get('base') if attributes: del kw['attributes'] else: attributes = ['*'] if objectclass: del kw['objectclass'] + if base: + del kw['base'] if sfilter: del kw['filter'] (exact_match_filter, partial_match_filter) = self._generate_search_filters(**kw) @@ -283,7 +286,10 @@ class ldap(CrudBackend): exact_match_filter = "(%s%s)" % (sfilter, exact_match_filter) partial_match_filter = "(%s%s)" % (sfilter, partial_match_filter) - search_base = "%s, %s" % (self.api.env.container_accounts, self.api.env.basedn) + if not base: + base = self.api.env.container_accounts + + search_base = "%s, %s" % (base, self.api.env.basedn) try: exact_results = servercore.search(search_base, exact_match_filter, attributes) -- cgit