diff options
author | Pavel Zuna <pzuna@redhat.com> | 2010-11-23 09:02:54 -0500 |
---|---|---|
committer | Adam Young <ayoung@redhat.com> | 2010-11-23 21:29:08 -0500 |
commit | 5060fdfade63f299bf3ad15c16a1aff06135b80f (patch) | |
tree | 4c6d5c7b5968c21e9af72423c25fe4a5e9b8a933 /ipalib/plugins/service.py | |
parent | 6d51a48af8afc52a0bf3f9437b2de1c2b8c1c0d4 (diff) | |
download | freeipa-5060fdfade63f299bf3ad15c16a1aff06135b80f.tar.gz freeipa-5060fdfade63f299bf3ad15c16a1aff06135b80f.tar.xz freeipa-5060fdfade63f299bf3ad15c16a1aff06135b80f.zip |
Change signature of LDAPSearch.pre_callback.
Add the opportunity to change base DN and scope in the callback.
Diffstat (limited to 'ipalib/plugins/service.py')
-rw-r--r-- | ipalib/plugins/service.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ipalib/plugins/service.py b/ipalib/plugins/service.py index c65a7a4ac..6cdba9b32 100644 --- a/ipalib/plugins/service.py +++ b/ipalib/plugins/service.py @@ -377,7 +377,7 @@ class service_find(LDAPSearch): member_attributes = ['managedby'] takes_options = LDAPSearch.takes_options has_output_params = LDAPSearch.has_output_params + output_params - def pre_callback(self, ldap, filter, attrs_list, base_dn, *args, **options): + def pre_callback(self, ldap, filter, attrs_list, base_dn, scope, *args, **options): # lisp style! custom_filter = '(&(objectclass=ipaService)' \ '(!(objectClass=posixAccount))' \ @@ -386,8 +386,9 @@ class service_find(LDAPSearch): '(krbprincipalname=krbtgt/*))' \ ')' \ ')' - return ldap.combine_filters( - (custom_filter, filter), rules=ldap.MATCH_ALL + return ( + ldap.combine_filters((custom_filter, filter), rules=ldap.MATCH_ALL), + base_dn, scope ) def post_callback(self, ldap, entries, truncated, *args, **options): |