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

Re: (ITS#5456) inaccurate interpretation of LDIF in back perl

hyc@symas.com writes:
> uw@o3si.de wrote:
>> The database backend "back_perl" expects LDIF entries beginning with
>> "dn:" and ending with an empty line. (...)
> Wrong. (...) all records must end with LF or CR/LF.

You two seem to be saying the same thing:  An entry should end with a
line terminator, but not with several line terminators (which give
blank lines).

>> After some testing with back_perl I noticed that the LDIF entries
>> produced by the perl module Net::LDAP::LDIF were not acceptet because
>> they are beginning with an empty line and ending only with a simple
>> CR charakter.

If you really mean CR (\r), that's a Net::LDAP::LDIF bug.  However
Net::LDAP::LDIF on my host correctly ends an entry with LF (\n).
And back-perl (at least the search operation) accepts entries
ending with both zero, one and two '\n's, as well as with '\r'.

There was however an entry parsing bug (ITS#4852) in 2.3.32 which was
fixed in 2.3.35.  I don't see how it'd be related, but I suggest you
upgrade anyway.  Then if you still have trouble, try a simple perl
script which does something like
  sub search { 0, "dn: o=foo\no: foo\nobjectClass: organization\n" }
instead of going via a module like Net::LDAP::LDIF, so you can
be quite sure the problem is what you think it is.