[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: Search Filter: Builtin Date/Time Functions?
> Brian Piesik wrote:
>>
>> ldapsearch "(&(radiusExpiration>=`date +%Y%m%d%H%M%S%z`))"
>
> Here you are constructing a valid search filter with the help of shell
> expanding/escaping etc.
>
>> Obviously modifying
>> OpenLDAP should prove the least amount of work since it's one
>> application used by many.
>
> Not possible without violating the LDAP standard.
>
>> My plan is use a predefined string / parameter that would be parsed
>> internally by the server. An example would be something like:
>>
>> (&(radiusExpiration>=getDate()))
>
> 1. You have to extend the LDAP standard for this to work. In particular
> this affects the filter string representation. I'd suggest to read RFC
> 2254 before going any further.
>
> 2. This would be a server-side implementation of getDate() which is
> probably not what you're after. Think of time sync problems...
If you want to synchronize with the server, you can ask for its
current date by searching for attribute "monitorTimestamp" in
"cn=Current,cn=Time,cn=monitor" entry; you'll get it directly
in generalized time format.
p.
--
Pierangelo Masarati
mailto:pierangelo.masarati@sys-net.it