directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Karasulu <aok...@bellsouth.net>
Subject Re: Q: LookupFilter doesn't receive useful info
Date Mon, 13 Dec 2004 21:23:08 GMT
Mark Swanson wrote:

>On December 13, 2004 3:35 pm, Alex Karasulu wrote:
>  
>
>>Mark Swanson wrote:
>>    
>>
>>>Hello,
>>>
>>>1. I notice that not matter what the baseDN I connect with the
>>>LookupFilter.filter() Name is always empty. Why is that?
>>>      
>>>
>>I do not know what the context of LookupFilter.filter() is.  Can't parse
>>the question.
>>    
>>
>
>OK. Lemme try again: why is the LookupFilter.filter(Name dn) dn paramter 
>always empty? (Or perhaps, what sort of query would set it?)
>
>  
>
>>>2. Why do the LookupFilter.filter() Attributes not reflect the lookup?
>>>      
>>>
>>Again don't have enough context info.
>>
>>    
>>
>>>F.E.
>>>ldapsearch -p 10389 -h lin -x -D "uid=admin,ou=system" -b
>>>"ou=super,ou=contacts,uid=6760,dc=home2,dc=mark" -v -w secret "cn=a b"
>>>      
>>>
>>This ...
>>
>>"cn=a b"
>>
>>is not a valid search filter.  I think you're looking for something like
>>this '(cn=a b)'. Oh and just as separate advice try to avoid " and use a
>>' to quote if you do not need substitution.
>>    
>>
>
>OK. I guess ldapsearch is forgiving my bad syntax as I get the same result 
>with both. I'll use '(cn=a b)' from now on.
>
>  
>
>>>I would expect the dn and/or the attributes to contain "ou=super" but
>>>neither do. In fact, the search request "cn=a b" isn't even available.
>>>This means I'm unable to filter based on a single thing the user used as
>>>a query/lookup parameter...
>>>      
>>>
>>Sorry Mark but I'm having a lot of trouble understanding you.  I think
>>you're presuming I have more context in me head than I do.  Can you try
>>again presuming I know nothing.
>>    
>>
>
>Sorry. I'll try again.
>
>I have this entry:
>cn=a b,ou=super,ou=contacts,uid=6760,dc=home2,dc=mark
>
>I connect with a baseDN of ou=super,ou=contacts,uid=6760,dc=home2,dc=mark
>
>I have this query: '(cn=a b)'
>
>I have successfully inserted my own SWLookupFilter into eve.
>
>  
>
This last sentence I still don't understand.   Where is this 
LookupFilter code from?  Is this code yours?  Is this a filter you're 
writing for your custom interceptors? 

>SWLookupFilter.filter(LdapContext ctx, Name dn, Attributes entry) is called 
>and I print out "dn" and "entry". I get the following:
>
>dn: empty
>entry: 
>1. Apache Software Foundation
>2. ou=system
>3. dc=home2,dc=mark
>4. cn=schema,ou=system
>
>The problem/question is this: how is it possible for SWLookupFilter to do any 
>sort of filtering or query rewriting when SWLookupFilter isn't presented with 
>the query or baseDN? perhaps the baseDN is available in the LdapContext but 
>looking at the API doesn't reveal it (to me at least).
>
>  
>
Well I'm going to presume u are trying to write an interceptor to filter 
entries on a return for schedule world.  There really is nothing in this 
trail that says anything like that but this is the only thing I can 
think of after scratching my head here for 5 minutes. 

Also note that btw a base search on the empty string DN is valid in 
LDAP.  That's a search on the root DSE.  Now this might come into the 
server if you are hitting it with a client that reads schema info.  I 
recommend this...whip out ethereal and get it to show you what's being 
sent by the client to be absolutely sure of what's happening.

You can send that to me too.  Also if you like send the filter code.  
I'll take a look at it.  BTW just to be sure ... this is your custom dev 
code and not any bug that needs to be fixed for 0.8.0 right?

Alex


Alex

>Shouldn't the query be in the attributes? Or am I misunderstanding the purpose 
>of the "Attributes entry" parameter?
>
>Thank you.
>
>
>
>
>  
>


Mime
View raw message