On 20/6/06 8:56, Eric Nichols <[EMAIL PROTECTED]> wrote:

> Wow!  The Net::LDAP::Schema stuff is too cool...  Absolutly simple to use.
> 
> Active Directory/Exchange 5.5/ADAM all impose size limits on their attributes.
>  In the schema they set 2 attributes rangelower & rangeupper for each schema
> definition.  Is there any way to extract this information using
> Net::LDAP::Schema combined with the information like syntax, type etc.?
> 
> I'm sure it's a pretty straightforward hack to schema.pm but I'm a bit lost
> with the code.

Schema.pm tokenizes the entire attributeTypes value, and then builds
%schema_entry from those tokens. The code in Schema.pm that extracts (and
removes) the standard length parameter from the syntax field looks to be
this:

      #
      # Extract the maximum length of a syntax
      #
      $schema_entry{max_length} = $1
        if exists $schema_entry{syntax} and $schema_entry{syntax} =~
s/{(\d+)}//;

I *think* (without running the code or having Active Directory to check)
that unknown fields in attributeTypes will simply get stored in
%schema_entry as-is. Since the correct way to extend attributeTypes is to
add unknown fields named X-<something>, you might find the AD extensions are
already there.

But if AD extends things in an incompatible way, then the code above is
where I'd start hacking.

Is there any documentation describing how AD extends this stuff?

Cheers,

Chris


Reply via email to