summaryrefslogtreecommitdiffstats
path: root/ipalib/plugins/f_user.py
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2008-12-10 16:45:07 -0500
committerRob Crittenden <rcritten@redhat.com>2008-12-10 16:45:07 -0500
commit46bd3974af5ce312cb1dd3ca12e6184d78dc470e (patch)
treed5fb4d400c8dc5996e8e3256764d0cb6d2db7a0d /ipalib/plugins/f_user.py
parentaf7b5645af001352aff626f46ec39031b2e9b10a (diff)
downloadfreeipa.git-46bd3974af5ce312cb1dd3ca12e6184d78dc470e.tar.gz
freeipa.git-46bd3974af5ce312cb1dd3ca12e6184d78dc470e.tar.xz
freeipa.git-46bd3974af5ce312cb1dd3ca12e6184d78dc470e.zip
Don't pass along the kw dictionary we were passed by XML-RPC.
We generally want to just search indexed attributes. We get this list of attributes from the configuration, use it.
Diffstat (limited to 'ipalib/plugins/f_user.py')
-rw-r--r--ipalib/plugins/f_user.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/ipalib/plugins/f_user.py b/ipalib/plugins/f_user.py
index c8b819dd..8cd3a592 100644
--- a/ipalib/plugins/f_user.py
+++ b/ipalib/plugins/f_user.py
@@ -282,17 +282,18 @@ class user_find(crud.Find):
search_fields_conf_str = config.get('ipausersearchfields')
search_fields = search_fields_conf_str.split(",")
+ search_kw = {}
for s in search_fields:
- kw[s] = term
+ search_kw[s] = term
object_type = ldap.get_object_type("uid")
if object_type and not kw.get('objectclass'):
- kw['objectclass'] = object_type
+ search_kw['objectclass'] = object_type
if kw.get('all', False):
- kw['attributes'] = ['*']
+ search_kw['attributes'] = ['*']
else:
- kw['attributes'] = default_attributes
- return ldap.search(**kw)
+ search_kw['attributes'] = default_attributes
+ return ldap.search(**search_kw)
def output_for_cli(self, textui, result, uid, **options):
counter = result[0]