LdapServer.search(): add default filterstr and attrs parameter values

This commit is contained in:
Benjamin Renard 2020-09-23 15:54:33 +02:00 committed by root
parent 66df317940
commit d49ae5aabb

View file

@ -64,7 +64,7 @@ class LdapServer(object):
return ldap.SCOPE_SUBTREE
raise Exception("Unknown LDAP scope '%s'" % scope)
def search(self, basedn, filterstr, attrs, sizelimit=0, scope='sub'):
def search(self, basedn, filterstr='(objectClass=*)', attrs=[], sizelimit=0, scope='sub'):
res_id = self.con.search(basedn, self.get_scope(scope), filterstr, attrs)
ret = {}
c=0