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

Re: Shell Filter Test Utility?



At 05:45 AM 6/16/00 +1000, Tim Burgess wrote:
>a) accept an ldif file (from stdin, say)

Easy to do with Perl and one of the LDAP APIs.  Likely easy to
do in a number of other scripting languages.

>b) test it for a match to the rfc xxxx (i can't remember :] ) filter spec
>passed on the commans line.

This is quite difficult to fully evaulate the filter.  The script
would have to have knowledge of subschema and implement all the
syntaxes and matching rules necessary to evaluate the filter.  It
can short cut by not supporting subtyping and only a few syntaxes
and matching rules... but even handling simple filters is
non-trivial.

>c) either output something or return status depending on the result

That the easy part.

>Does anyone know of such a utility or something similar?

I'd look at net:::LDAP and PerlLDAP.  Both have LDIF support
and some schema handling capabilities... however I doubt they
implement enough of the information model to support local
filter evaluation.

Kurt