Ok I think I just answered my own question.  Once I looked at the code it's
was pretty simple to patch in a change to make all this happen.

So it now shows a combined output:
range-lower     1
name    sn
oid     2.5.4.4
property-guid   417A96BFE60DD011A28500AA003049E2
range-upper     64
indexed 1
property-set-guid       54018DE4F8BCD111870200C04FB96050
aliases
type    at

The code is very non-invasive and is only a couple of lines.  Can you please
add this to your package?
Thanks
Eric

I'm sure I'm showing this wrong so I'll include the diff as well as a clip of
the code:

$ diff LDAP.pm.orig LDAP.pm
872a873
>               extendedAttributeInfo

-clip-
sub schema ....
  $mesg = $self->search(
    base   => $base,
    scope  => 'base',
    filter => '(objectClass=subschema)',
    attrs  => [qw(
                objectClasses
                attributeTypes
                matchingRules
                matchingRuleUse
                dITStructureRules
                dITContentRules
                nameForms
                ldapSyntaxes
                extendedAttributeInfo
              )],
  );
-clip-

$ diff Schema.pm.orig Schema.pm
268a269
>       at      extendedAttributeInfo

-clip-
my %type2attr = qw(
        at      attributetypes
        oc      objectclasses
        syn     ldapsyntaxes
        mr      matchingrules
        mru     matchingruleuse
        dts     ditstructurerules
        dtc     ditcontentrules
        nfm     nameforms
        at      extendedAttributeInfo
);
-clip-


303a305,307
>       #Handle Special Active Directory Format (token but no data)
>       $val=~s/(indexed|system-only)/\1 \'1\'/ig;
>

-clip-
sub _parse_schema ...
      #
      # We assume that each value can be turned into an OID, a canonical
      # name and a 'schema_entry' which is a hash ref containing the items
      # present in the value.
      #
      my %schema_entry = ( type => $type, aliases => [] );

      #Handle Special Active Directory Format (token but no data)
      $val=~s/(indexed|system-only)/\1 \'1\'/ig;
-clip-


On Sat, December 2, 2006 5:24 pm, Eric Nichols wrote:
> Happy Holidays!
> I've been desperately trying to gather the attribute length limits in AD (yes
> they exist).  I believe I've finally found it.  I had to go through the
> Net::LDAP::Schema source code to figure out how these queries are made and I
> found an extra attribute in the subschema object:  extendedattributeinfo:
>
> I ran an ldapsearch and was able to pull up this attribute:
>
> ldapsearch -b "cn=aggregate,cn=schema,cn=configuration,dc=vm-2k3,dc=com" -D
> [EMAIL PROTECTED] -w password  -s base objectclass=subschema
> extendedattributeinfo
>
> Example value:
>
> extendedAttributeInfo: ( 2.5.4.4 NAME 'sn' RANGE-LOWER '1' RANGE-UPPER '64' PR
>  OPERTY-GUID '417A96BFE60DD011A28500AA003049E2' PROPERTY-SET-GUID '54018DE4F8
> BCD111870200C04FB96050' INDEXED )
>
> My question I know sounds simple:  Can these extra values be merged into the
> schema object (aliases, single-value, syntax etc)?
>
> I know this probably isn't following standards but it would be a neat feature
> to specify extra attributes to merge in.  I will be more than happy to work
> with anyone on this.  I can even provide the full ldif entry (probably
> wouldn't) be nice to post it to the list..
>
> God I hope this makes sense.
> Thanks
> Eric
>
>

Reply via email to