No such luck.  I dumped all the data I could find and no go.  I'm a bit
hampered by my own ignorance of how schema retrieval works.  I did a straight
ldapsearch against an attribute and pulled up the LDIF below.  I guess my
question is where in schema.pm do you define what attributes you want to pull
for each schema object?

Chris if you are feeling energetic, I'd be more than happy to setup a VNC or
LDAP connection to my Active Directory box for you to experiment on.
Thanks
E


dn: CN=Common-Name,CN=Schema,CN=Configuration,DC=vm-2k3,DC=com
changetype: add
objectClass: top
objectClass: attributeSchema
cn: Common-Name
distinguishedName: CN=Common-Name,CN=Schema,CN=Configuration,DC=vm-2k3,DC=com
instanceType: 4
whenCreated: 20021023015013.0Z
whenChanged: 20021023015013.0Z
uSNCreated: 124
attributeID: 2.5.4.3
attributeSyntax: 2.5.5.12
isSingleValued: TRUE
rangeLower: 1
rangeUpper: 64
mAPIID: 14863
uSNChanged: 124
showInAdvancedViewOnly: TRUE
adminDisplayName: Common-Name
adminDescription: Common-Name
oMSyntax: 64
searchFlags: 1
lDAPDisplayName: cn
name: Common-Name
objectGUID:: 9pY09C317kWYEH7+YvuAWg==
schemaIDGUID:: P3mWv+YN0BGihQCqADBJ4g==
attributeSecurityGUID:: VAGN5Pi80RGHAgDAT7lgUA==
systemOnly: FALSE
systemFlags: 18
isMemberOfPartialAttributeSet: TRUE
objectCategory:
 CN=Attribute-Schema,CN=Schema,CN=Configuration,DC=vm-2k3,DC=com

On Wed, June 21, 2006 2:31 am, Chris Ridd wrote:
> 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