[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: Syntax functions in client library?
Steve Sonntag wrote:
>
> I assume you are describing the schema parsing functions
> from ldap_schema.h?
>
> If that is the case the problem I see is that the client has
> no idea what server the schema is being parsed for. There
> could be multiple connections, each server having perhaps
> a slightly different schema. Which one should be used
> for enforcement?
Good point. That's another reason for having as much syntax
handling functions available at the client side as possible/
convenient. I'm maintaining a "smart" (ah, ah, ...) client
that populates a DS which started with 1.2.X and grew up with
2.0.X; I faced many syntax issues mostly in a naive way as soon
as they came up but now I'd like to turn in into a really smart
(as much as I can, of course ;) client by making it check the
schema at the server level, yes, by using the ldap_schema.h
stuff. But, as soon as I know the syntax of an attribute, I'd
like to use the same (or something very close to the) function
the server is likely to use to check the syntax of my data.
One thing we could do is have functions that deal with
validation/prettying/normalization into the client library,
using a schema handler if available or failing if no schema
knowledge is present. Then we need an API function that gathers
(partial) schema information from a target server (or from each
entry's subschema, or from any standard source, even, say, by
directly parsing the schema files or so).
I understand there's still the need of some wit from the user
to collect the appropriate schema info for the purpose.
Ando.
--
Dr. Pierangelo Masarati | voice: +39 02 2399 8309
Dip. Ing. Aerospaziale | fax: +39 02 2399 8334
Politecnico di Milano |
mailto:pierangelo.masarati@polimi.it
via La Masa 34, 20156 Milano, Italy |
http://www.aero.polimi.it/~masarati