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

Re: Allowed syntax



In the Netscape Directory Server you would use a pre-operation plugin to
do this. Thus, even there you cannot do this purely in the schema.

I don't think OpenLDAP has this kind of plugin functionality (yet) and
does not support this idea in the schema. It's a hacking solution you'll
need and I would imagine that adding code to accommodate just your new
type would be relatively complex and far reaching. I could be wrong, it
could just be a table of pointers to functions, but I can see it being a
significant task.

I'd suggest an alternative data validation process.

Neil.

Himanshu wrote:

> I need some help on allowed syntaxes
>
> According to the man page of slapd.conf file, the syntax for the
> definition of an attribute is:
>
> attribute <name> [<name2>] { bin | ces | cis | tel | dn }
>               an attribute. The possible syntaxes and their mean-
>               ings are:
>                       bin    binary
>                       ces    case exact string
>                       cis    case ignore string
>                       tel    telephone number string
>                       dn     distinguished name
>
> In openLDAP, the defined possible syntaxes are as mentioned above.
>
> Is there any way I can define my own syntax, basically for pattern
> matching.
>
> For example, I have an attribute that can take up only few words
>
> say attribute OStype can be either one of the following pattern:
> Solaris, Sun, mach, aix, dos, irix, linux, sequent ... and few more.
> How do I restrict (in the schema) so that attribute OStype will accept
> only one of the above patterns.
>
> Any help is appreciated,
>
> Thanks
> Himanshu
begin:vcard 
n:Smith;Neil
tel;cell:+44 7801 789 070
tel;fax:+44 181 390 1666
tel;home:+44 181 406 8692
tel;work:+44 7801 789 070
x-mozilla-html:TRUE
org:LDAP Solutions Limited;Professional Services
version:2.1
email;internet:nsmith@ldap-solutions.com
title:Principal Consultant
adr;quoted-printable:;;34 Headley=0D=0AKing Charles Road;Surbiton;Surrey;KT5 8QW;England
fn:Neil Smith
end:vcard