[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: ldapsearch using entryCSN



Am Donnerstag 24 Juni 2010, 15:19:38 schrieb Pierre Laporte:
> My mistake, main problem solved.
> 
> Spaces are not allowed in ldap queries. In fact, I didn't get "no
> result", I got one message "Bad search filter" that was not handled
> correctly.
> 
> I changed my filters so that it now uses the createTimeStamp and
> modifyTimeStamp attributes.
> Using
> "(&(objectClass=groupOfUniqueNames)(modifyTimeStamp<=20091224))", I
> retrieve the entries that haven't been modified since 2009/12/24.
"modifyTimeStamp" seems like the correct Attribute to query for your use 
case. "entryCSN" is a bit more than just a timestamp.

> Caution : this filter cannot be applied to the entryCSN attribute as
> it makes OpenLDAP shutdown.
If it did, that would be clearly a bug. You should consider updating to a 
more recent OpenLDAP release and check if the problem persists there.

regards,
	Ralf
 
> On Thu, Jun 24, 2010 at 1:49 PM, Pierre Laporte
> 
> <pierre.laporte@steria.com>wrote:
> > Hi,
> > 
> > I'm trying to search entries in an OpenLDAP (v2.4.7) directory using
> > their last modification date as a criteria. Digging in the schemas,
> > I couldn't find an attribute that contained such a value. The only
> > thing I found was the internal attribute "entryCSN" used by
> > OpenLDAP to manage synchronization.
> > 
> > 
> > 
> > I tried to do several ldapsearch queries, but I couldn't manage to
> > obtain a decent result.
> > 
> > Using "(&(objectClass=groupOfUniqueNames))"
> > => I get every group of the directory. I can see that lots of them
> > were modified in 2009
> > 
> > Related problem :
> > 
> > Using "(&(objectClass=groupOfUniqueNames)(entryCSN<=20091224))"
> > => The slapd2.4 process stops without returning anything.
> > 
> > 
> > Using "(&(objectClass=groupOfUniqueNames)(entryCSN <= 20091224))"
> > (The same query with spaces)
> > => I don’t get any result. Shouldn't I retrieve the entries modified
> > before 2010/12/24 ?
> > 
> > 
> > Using "(&(objectClass=groupOfUniqueNames)(entryCSN >= 20091224))"
> > 
> >  => I don’t get any result. Shouldn't I retrieve the entries
> >  modified after
> > 
> > 2010/12/24 ?
> > 
> > 
> > 
> > - Does anyone know how to filter entries using their entryCSN?
> > 
> > - Btw, is it even possible?
> > 
> > Best regards
> > 
> > --
> > 
> > Pierre Laporte


-- 
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg)