Chris Ridd wrote: > On 4/5/07 6:34, "Webb, Andy" <[EMAIL PROTECTED]> wrote: > >> So, couldn't you just always request in the search that the DN or CN be >> returned as one of the attributes? If the entry is found, you're going >> to get the DN of the entry as the record identifier, then getting the DN >> (or CN) again as an attribute becomes just a throwaway, but solves the >> problem of producing or consuming bad LDIF.
The problem is, that I do not request the LDAP for entries (actually I do, but not in the module, where I need the patch). I use Net::LDAP::LDIF for converting LDIF buffers to Net::LDAP::Entry objects, so there may be situations, that entries, which was requested from LDAP somewhere else, do not contains attributes, only DN in it's LDIF (yes, DN is _not_ an attribute, sorry, that was my wrong specification). I think - as Net::LDAP::LDIF can be used for conversions both from file and memory-buffer - handling of such attribute-less objects should be a good thing... > The DN isn't an attribute of an entry that you can request. Kurt's drafted a > schema extension which provides the DN in a special entryDN attribute - see > draft-zeilenga-ldap-entrydn-02.txt. Of course not all servers support that > draft yet. > > I think though that it is probably reasonable to put your patch in as is, as > it is useful to be able to handle slightly non-conformant LDIF files. Thanks, this helps me to remove my patched LDIF module from our project :) > Cheers, > > Chris Regards, EdE