I'm having an issue where ldap searches with attribute lists return all 
attributes on the object regardless of the attributes in the provided list.

Here's my environment:

java version "1.8.0_20"
Java(TM) SE Runtime Environment (build 1.8.0_20-b26)
Java HotSpot(TM) 64-Bit Server VM (build 25.20-b23, mixed mode)

Groovy Version: 2.4.5 JVM: 1.8.0_20 Vendor: Oracle Corporation OS: Windows 7

Using the Groovy LDAP API available from 
http://directory.apache.org/api/groovy-api/1-groovy-ldap-download.html

Here's a sample of the code:

import org.apache.directory.groovyldap.*

Search s = new Search()
s.filter = '(eid=*)'
s.base ='ou=div,ou=emp,o=co'
s.scope = 'ONE'
s.attrs = ['eid', 'sn', 'givenname']

results = ldap.search(s)

println " ${results.size} entries found ".center(40,'-')
for (entry in results) {
   println entry.dump()
}

Running this

println s.getAttrs()

Yeilds this:

[eid, sn, givenname]

So I know the attribute list is set correctly.

I am trying to pull back a relatively large number of entries so the query is 
slow and memory usage soars because of all the unneeded attributes.

Is this a bug or am I missing something obvious?


Regards,

Andrew





Reply via email to